Thursday, June 07, 2007

Outlook 2007 LinkToWorkItem Macro (Convert a Work Item number into a link to the actual work item)

BUGBUG: poor title - Outlook macro for work item and changeset hyperlinks -- updated for 2007

"When I upgraded to OL2007, Buck's great little macros stopped working.  Today, I finally got the guts to ask the Outlook guys what they broke improved.  The answer was simple enough.  I'll let the code do the talking:

Sub LinkToWorkItem()
Set oDoc = ActiveInspector.WordEditor
Set oWord = oDoc.Application
Set oSelection = oWord.Selection

'' Convert the current selection to a work item hyperlink'
oDoc.Hyperlinks.Add Anchor:=oSelection.Range, Address:= _
"http://tfserver:8080/WorkItemTracking/Workitem.aspx?artifactMoniker=" _
& oSelection.Text, _
SubAddress:="", ScreenTip:="", TextToDisplay:=oSelection.Text

End Sub
..."

I email my users Work Item numbers all the time. For their future reference, so they know something has been logged, can track when one of their WI's has been released, etc.


This macro will come in handy, making it easier for me to provide them even better service and communication (links are good ;)


Update #1 6/7/2007 @ 8:10AM PDT:


OMG, I just had a major ID 10 T error (ID 10 T? Put it together... ID10T, aka Idiot  ;) Also known as a Brain Cramp or Brain Fart...


I immediately wanted to give the above snip a try. So I added the macro, found an email I just sent with a WI number in it, selected the number, executed the macro and BAM, no joy. Out of Memory error.


So I spent the next 15 minutes trying to figure out what was going on. Everything looked right, it all should have worked, I'm using Word as the email editor, the code was right, the range and selection was good, etc, etc, etc.


Then it hit me.


The email I selected the WI in was an email I previously sent. It wasn't one I WAS sending. It was in read only mode! DOGH! LOL


As soon as I opened that email for editing (by "Forward"ing it, in this case) the original macro worked just fine.


sigh... It's always the little things... :p

Wednesday, June 06, 2007

Cropper to TFS Plugin Released

CodePlex - CropperTFSPlugin

"Project Description
A Cropper plugin for creating Team Foundation Server work items with the captured cropper image.

News
Version 1.0 is now available"

Sounds cool...

See this post (Cropper TFS Work Item Plugin) for some background on this plugin.

(via Not So Smart Builder - CropperTFSPlugin)

 

Related Past Post XRef:
Cropper Plugins 1.1 Released
Cropper 1.9.1 Released (Includes Vista Compatibility)

Funny Lines from Actual Court Transcripts

Law Firm Blogging.com - Attorney jokes from actual trial excerpts

"... These are from a book called Disorder in the American Courts, and are
things people actually said in court, word for word, taken down and
now published by court reporters who had the torment of staying calm
while these exchanges were actually taking place.
...
________________________________________
ATTORNEY: Were you present when your picture was taken?
WITNESS: Are you shittin’ me?
______________________________________

...
______________________________________
ATTORNEY: ALL your responses MUST be oral, OK? What school did you go
to?
WITNESS: Oral.
______________________________________

..."

This post had my crying I was laughing so hard...

Tuesday, June 05, 2007

SourceGear DiffMerge - Free Cross Platform GUI Diff & Merge Utility

Eric.Weblog()Free Diff Tool: SourceGear DiffMerge

"...

DiffMerge is "free of charge", or as some folks say, "free as in beer".  DiffMerge is not open source nor is it "free" in the Richard Stallman sense of the word.  DiffMerge is a no-cost application that anyone can download and use.  It is not a trial, a demo or an eval.  It is fully functional and fully featured.

...

So, we're unveiling SourceDiffMerge 3.0 as our attempt to be the best of the breed.  I'm not sure we've hit the target, but we've come very close.  Highlights include:

  • Compare two text files
  • Lots of supported character encodings
  • Intra-line highlighting of the changed portion of a line
  • Three-way merge, including automatic merge whenever possible
  • Compare folders
  • Cross-platform:  Runs on Windows and Mac OS X.  Oh, and Linux too.
  • Full support for editing
  • Fully customizable

..."

I was just looking for a Windows GUI Diff app the other day. This one looks pretty cool and is perfectly priced...

[Download]

(via dzone - Free Diff Tool: SourceGear DiffMerge)

Deploying a VB6 App when using the Interop Forms Toolkit

The Visual Basic Team - Deploying Applications with the InteropForms 2.0 toolkit

"...

To save you some time, here's what we recommend in general with building mixed apps.

a) Use the Interop Forms Toolkit to build Interop Usercontrols instead of Interop Forms.
b) Remove the reference to Microsoft.InteropForms.dll library unless you plan on taking advantage of some of it's functionality such as the Globals class (for sharing state) or the EventMessenger class (for raising application-level events).
c) Configure your usercontrol manifest appropriately and create an application manifest for your VB6 app so you can take advantage of Reg-free COM
d) Modify your legacy setup to copy over your new usercontrol binary and the application manifest into your application folder.

If you can do this, you can easily augment an existing application in a painless way. ...

..."

Some great tips on deploying your VB6 app if you've decided to take the Interop Forms plunge.

I've been watching the Interop Forms Toolkit space since it came out and am starting to come around. I've not yet used it, but I can't seem to kill some of my VB6 apps (funny that... how hard it is to kill/overhaul an app suite that's helping bring in some good revenue... ;) and I've come to really like .Net 2. It feels like I'm stepping back into the 90's every time I code in VB6... Wait I AM stepping back into the 90's every time fire up my VB6 brain cells! :/

Anyway... I'm starting to get over my initial hesitation about this Toolkit (I'm thinking about it like I'm adding bionic's to my VB6 apps.... making it better, stronger, yada ) and may very well use it in production... maybe...

When/if I do, the above post will come in handy...

Related Past Post XRef:
Microsoft Interop Forms Toolkit Rev'ed to 2.0

Monday, June 04, 2007

MS SDK for Open XML (June CTP)

Microsoft Downloads - 2007 Office System: Microsoft SDK for Open XML Formats

"The 2007 Microsoft® Office system introduces a new file format that is based on XML called Open XML Formats. Microsoft Office Word 2007, Microsoft Office Excel® 2007, and Microsoft Office PowerPoint® 2007 all use these formats as the default file format. Open XML formats are useful for developers because they are an open standard and are based on well-known technologies: ZIP and XML. Microsoft provides a library for accessing these files as part of the WinFX technologies in the System.IO.Packaging namespace. This SDK is built on top of the System.IO.Packaging API and provides strongly typed part classes to manipulate Open XML documents [GD: Emphasis added]." [Description leached in full]

That sounds pretty cool. That should/could make automated Office doc creation much easier...

I'll likely wait for it to RTM (or until I really need to OpenXML, like when I extend my Blogger Backup utility to output WordML? ;) but I WILL be watching...

(via US ISV Developer Evangelism Team - MicrosoftSDK for Open XML Formats)

Google's Other Purchase Last Week - GreenBorder (Application Virtualization)

virtualization.info  - Google acquires application virtualization vendor

"On end of May Google silently acquired application virtualization startup GreenBorder.

GreenBorder uses application virtualization for security containment of desktop software like browsers, email clients, rich-media players, archivers, etc.

..."

I REALLY dig application virtualization and believe it could help solve a number of problems. I would love to see it baked into the next version of Windows... 

Interesting seeing Google get into this space.

Scott Hanselman's 32 Blogging Tips

Scott Hanselman's ComputerZen.com - Blog Interesting - 32 Ways to Keep Your Blog from Sucking

"I blog for me, mostly so I can Google myself later.  But, I also enjoy the back and forth, the connections, with you, Dear Reader. I like being able to kick ideas around with a collective of peers and smart folks. I also would like this blog to not suck.

Recently Richard Campbell and I were chatting about what makes a blog, technical or otherwise, suck less. Here's what I came up with, with Richard helping as scribe.

..."

Scott provides 32 great blogging tips. If you're a blogger, his post is WELL worth a read...

Sunday, June 03, 2007

WLW Picture Post Plugin 1.0.0.7 Released (Windows Live Writer Beta 2 Release)

I've updated and released v1.0.0.7 of my Windows Live Writer Picture Post Plugin

The primary update in this version was to get it working in Windows Liver Writer Beta 2 (WLW B2).

Release Notes

PLEASE NOTE: This version only works with Windows Live Writer Beta 2

  • Better implementation of the WLW B2 fix (this time using the AssemblyResolve event. See below for the dirty details)
  • Added Preview Feature
    • Now you can preview how the picture/thumbnail will look prior to inserting it (to make sure the selected thumbnail size is what you had in mind, etc).
  • Changed initial plugin behavior - canceling the initial file selection dialog also cancels the Upload Picture Dialog
    • So now you don't have to click Cancel twice...
  • Added Plugin version number to the dialog Title (This was fun too... again, see below for more details)
  • Added Visit FlickrNet linklabel 
    • To give additional credit to the library that without which coding this plugin would have been much harder...
  • Fixed layout/dialog resize with the Insert As label and combobox

 

This plugin still needs some polishing, but it works and does for me what I need it to do (which is quickly upload pictures to Flickr/23hq and insert them into the WLW post)...

Once Zooomr Mark 3 is stable, I'll again see about adding Zooomr support (I need to find a way to get a Developer Key)

Here are some screenshots from this new version.

   

 

WLW B2 Dependant Assembly Resolution Notes

Background:

I was having an dependant assembly load issue. With WLWL B2, my plugin wasn't able to find the FlickrNet assembly and was gacking. And probably rightly so...

When I started using FlickrNet I was worried about file collisions with other WLW plugin's with used it (like Flickr4Writer, etc). I didn't want to worry that I might overwrite a newer version or have another plugin's install overwrite mine (or worry about version comparability, etc). I wanted to be sure that the FlickrNet version I was using was always what I intended. And while FlickrNet is strong named, I didn't want to GAC it (for xcopy deployment simplicity).

So what did I do? A slimy hack... I renamed the FlickrNet.dll to WLWPicturePost.FlickrNet.dll. And it seemed to work okay, until now...

In hindsight, I now feel that was officially "bad" (Ya think? To rename a strongly named DLL. I should have used another approach).

And now with WLW B2, this hack came back to bite me.

Resolution:

To resolve this, I'm now creating a private bin "WLWPicturePost" subfolder in the Windows Live Writer\Plugins folder and putting my correctly named FlickrNet.DLL in there. And doing another hack... sigh.

To enable my plugin to find FlickrNet in it's new subfolder, I had add the following code snip;

AppDomain.CurrentDomain.AppendPrivatePath( _ AppDomain.CurrentDomain.SetupInformation.PrivateBinPath & "\WLWPicturePost")

The issue is that AppendPrivatePath is deprecated and will likely go away in the future.

I tried changing my plugin's App.config, adding runtime dependantAssemply redirection, codebase href, updating the probe, etc, but no joy (because it's an assembly inside another .Net App?). Can't use PrivateBinPath because that only works when creating a new AppDomain. I tried hooking into the AssemblyResolve event, but... well... I got lazy and didn't work too hard on getting that to work.

So at least AppendPrivatePath works, but....

Anyway, I'm not TOO worried about the deprecated usage though... The .Net 2 framework base will be with us for another couple years at least (since .Net 3 & 3.5 all include 2.0 as their base), so I don't have to fix this today. But I have to say this current solution just doesn't smell all that good to me...

Probably the AssemblyResolve event will be the right way. Or probably even better, GAC'ing FlickrNet (since it's already strongly named, GAC'ing it solves my version concern, and any user installing a Plugin already has to have rights to write to the Program Files folder, so will likely have to be admin elevated anyway...?).

[...the next day...]

I woke up this morning and just didn't feel right with my AppendPrivatePath solution...

So after a quick SearchDotNet I found this Microsoft Knowledge Base article, "How to load an assembly at runtime that is located in a folder that is not the bin folder of the application", which was exactly what I needed.

A few minutes later, I had a "good" working solution to my dependant assembly issue. Yeah! I feel much better now... :)

 

Plugin Version in the Title Notes

I like putting an app's version number into it's Title text. I've found it makes my support life easier. I never have to ask a user, "what version are you using..." when they send me a screenshot (nor do I have to guess).

Usually it's as easy as putting the below line in the Form_Load event;

Me.Text = Me.Text & " (" & My.Application.Info.Version.ToString & ")"

Well guess what happened when I did this for this plugin? I got a version number all right. The WLW Version number! (12.0.1183.516). Dogh!

Well I KNOW my assembly has it's own version number, all I had to do was find a way to get at it.

After a bit of playing around (and looking at the work down in the above AssemblyResolve event handling), this is the solution I found...

Imports System.Reflection

.... Form_Load ...

Dim objExecutingAssembly As [Assembly]
objExecutingAssembly = [Assembly].GetExecutingAssembly()
Me.Text = Me.Text & " (" & objExecutingAssembly.GetName().Version.ToString & ")"

 

Related Past Post XRef:
WLW Beta 2 Notes
Picture Post Windows Liver Writer Plugin v1.0.0.4 Released (Web Proxy Release)
Windows Live Writer Picture Post Plugin v1.0.0.1 Beta Released
Another Weekend, Another WLW Plugin - WLW Picture Post Plugin

Saturday, June 02, 2007

PowerShell Quick Reference & Graphical Help File(chm)

Microsoft Downloads - Windows PowerShell Quick Reference

"Quick reference guide to commonly-used Windows PowerShell commands. For best results, open the file in Microsoft Word, print the contents to legal-sized paper (8 inches by 14 inches), and fold the resulting printout in half, making a four-page booklet."

Microsoft Downloads - Windows PowerShell Graphical Help File


"View the Windows PowerShell 1.0 help (including cmdlet help and the About topics) in a fully-searchable, graphical format (a standard Windows .chm file). Also included in the help file is the VBScript to Windows PowerShell Conversion Guide."

The VBScript to PowerShell Conversion Guide sounds like it might come in handy...

Friday, June 01, 2007

ClickOnce Publish with TeamBuild

Tim Hibbard - Publishing a ClickOnce app with TeamBuild

"After much frustration, I've finally configured our TeamBuild proj file to publish our ClickOnce app, and increase the version number (kinda an important step).  The Vertigo blog talks about using SolutionToPublish, but that doesn't work for all situations.  Specifically, when your solution contains projects that reference other projects. 

So I started playing with the MSBuild Community Tasks Project, and came up with the following Xml for my proj file:

..."

Another background "want" I've had is to ClickOnce publish via TeamBuild. I guess if you wait long enough... (and read enough blog posts... ;)

Google Has Bought FeedBurner...

Google Blog - Adding more flare

"As you know, we're constantly looking for ways to identify and offer new tools for content creators and website publishers. Likewise, we constantly aim to give AdWords advertisers broader distribution to an even wider audience of users. For these reasons, we're very pleased to tell you that we've just acquired FeedBurner.

..."

That's a pretty logical move.

Microsoft, you need to pickup NewsGator now, before Google does. You know it's coming that someone will pick them up, and if MS doesn't I'd put money on Google (though there is a good bit of product/service overlap between NewsGator and Google).

I think MS needs them much more, since they don't have a good web based Feed platform, nor a mature Feed Windows client, nor a central feed repository, etc.

Think;
"Windows Live Web Feed Reader" (web, NewsGator Online)
"Windows Live Reader" (full client, FeedDemon)
"Windows Live Feed Service" (feed repository, NewsGator Online/Sync API)
"Windows Live Feed Outlook" (feed reading in Outlook, NewsGator Inbox)
"Windows Live Caststation" (podcasting, Feedstation)
"Windows Live Feed Mobile" (NewsGator Go)...

Then there's the enterprise Feed server/hosting (NewsGator Enterprise) which would be cool in Exchange or maybe SharePoint...

Ton's Of Cool XNA (XBox360) Examples

XNA UK Users Group - Rare Examples

"When Microsoft released version 1.0 of the XNA Framework they had a couple of parties, one of them here in England. If you were there then chances are you got hold of some of Rare's XNA tests that they coded up. If you weren't there then now you can.

We have several new downloads available, from simple examples to full-on 3D platformers with in-game editors. There's loads of good code to pore over. You can get them in our downloads section. Oh, one thing most of them are setup for the Xbox 360, but the code is still good for Windows." [Post Leached In Full]

Some very cool XNA/XBox 360 examples...

Below is a leached listing from the download section.

[Xbox 360 Only] 1 to 4 player game. Plays like a cross between asteroids and gravity wars.
[Xbox 360 Only] Breakout clone.
[Xbox 360 Only] Shows a real-time deformable height map terrain. You can deform the height map by firing at the ground.
[Xbox 360 Only] Basic example of getting started with XNA.
[Xbox 360 Only] 2D platformer with paralax scrolling and in-game editor.
[Xbox 360 Only] 3D puzzle/platformer with in-game editor.
[Xbox 360 Only] Expands on the deformable height map example to provide a character that can be moved around the landscape and alter it by using different types of grenades.
[Xbox 360 Only] A rhythm action game demonstrating advanced sound techniques.
[Xbox 360 Only] Example of a 3D particle system. Uses an interesting generator technique for easily generating values for the various particle system parameters.
[Xbox 360 Only] Marble Blast like game where you control a rolling, jumping marble. Navigate 3D platforms that can be moving and spinning to reach for the star.
[Xbox 360 Only] Roll a ball around avoiding red sectors and hitting green sectors.
A selection of 3D models in various file formats.
Selection of music tracks from Rare's composers.
Selection of sprite textures.
[Xbox 360 Only] Shows how to draw text using a custom font renderer.
Shows simple game state/screen management.
[Xbox 360 Only] Um, it's space invaders but this time you (up to 4 of you) are the invaders!
[Xbox 360 Only] 2-4 player top down tank game.
[Xbox 360 Only] Witchy, 2.5D bullet hell shoot 'em up.

(via Mykres Space - XNA Rare Examples for Download)

TreeViewAdv 1.6 Released (Free/OSS TreeView Component for .Net)

SourceForge - TreeViewAdv for .Net

"Extensible advanced TreeView. 100% management C# code. Features: Model/View architecture. Multicolumns. Multiselection. Different controls for each node: CheckBox, Icon, Label... Drag&Drop highlighting. Load on demand. Incremental search."

Screenshot Screenshot

I've been keeping my eyes open for a new/upgraded/uber free/OSS TreeView control for .Net for future projects.
(I use Infragistics at work and have gotten used to using an advanced TreeView, but for home, OSS, and personal projects Infragistics is not really viable...)

TreeViewAdv is one I've recently started monitoring and I noticed today that v1.6 was released.

I've not played with this component yet, but it looks pretty interesting...