Category Archives: Uncategorized

Experienced Developer/Architect

Filed under Uncategorized

Time to move on.

The company I was working for sold several months back. Unfortunately, it was more of a liquidation than a sale, and the buyer already has a pile of developers on staff.

Soooo…   I find myself looking for greener pastures (and tasty hay<G> ) once again.

I’ve worked in the commercial software realm for over 20 years, as developer, manager and architect, so I’m well versed in SDLC, and everything from spec development, to coding, testing, beta rollout management, bug tracking, installation development, and versioning.

I’ve written for developer mags like VBProgrammers Journal, and am a co-inventor on 8 patents (numbers 6,678,615, 6,631,326, 6,842,698,  7,142,217,  7,148,898,  7,167,187,  7,190,377 and 7,161,604). I drive for unique solutions to hard problems.

If you’ve got needs in any of the following areas, drop me a message. Maybe I can help.

  • (and .net in general)
  • Legacy VB to .net conversions (VB1 through 6, even the old DOS Basica and PDS, I’ve done ‘em all!)
  • SQL Server, TSQL, optimization tuning, DB design, etc.
  • Code porting to .net (I’ve worked with C#, Cobol, and Pascal, but can read just about anything!
  • Document Management System Integrations (particularly, DocsOpen, Interwoven, and WorldOX, various versions)
  • Legal and medical software
  • GIS (Geographic Information Systems)
  • Office integrations (especially commercial-level addin design and development)
  • Low level integrations (serial port, networking, that sort of stuff)
  • Installer building (particularly Wise or InstallShield)
  • Development management/team leadership
  • Product design/architecture
  • Documentation/specifications


TFS Build Node Shows a Red X

Filed under Uncategorized


The screenshot says it all. Why was my Build node in TFS suddenly x’d out? Completely dead.

Oddly, the queries, work items, source explorer, etc. all worked fine.

But I could no longer browse or view the status of builds.

A coworker pointed me to this post, which discussed several possible solutions.

Eventually, I was able to get things working fairly easily by:

  1. Backing up my entire Visual Studio settings collection (look in the Tools Menu, Import and Export Settings).
  2. Running devenv /resetuserdata (I had to run this directly from it’s folder, C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE because I’ve never put that in my PATH).
  3. Then restoring my saved settings except for the TFS settings section:


Once it finished, presto, my Build node was operational again.

Using Embedded Fonts In an External Flash Library

Filed under Uncategorized

One project I’m working on now involves showing a “preview” of a user’s selected options in a window on a web page.

The options involve font selection, styles (bold, italic, etc), color, and even mirroring (reversing the text as if it was going on the inside glass of a window).

Most of that would be relatively easy in javascript and CSS, except for the font.

How the heck can you display fonts to a user that doesn’t actually have those fonts installed on their machine?

Well, there’s likely a number of different possibilities, but Flash represents one of the cleaner (if not mind-bogglingly complicated) approaches to the problem.

There are a number of articles on the web concerning embedded fonts in flash, so I’ll try not to rehash that here. But there are a few gotchas that proved very difficult to hunt down, with virtually no mention of them on the web that I could find.

The Setup

First, I’m using Flash CS4 and ActionScript 2.0.

Create two files in Flash. I called one Test2.fla and the other Fonts.fla.


The Fonts.fla will be our external Fonts Resource file. Why external? Why a separate file? Well, technically, once you’ve gotten your fonts together, it’d be nice to not have to continue to have them installed on your machine. Separating the fonts from the flash files that will use them allows you to build the font resource SWF file once, remove all those fonts, and then still be able to work on your actual Flash file (the one with your actual movie/code in it).

Note the properties for my actual movie fla file:


Its basically the same settings for the Fonts.fla file, although, technically you could set it as ActionScript 3.0, I suppose. There’s no script necessary for the Fonts.fla file.

Setting Up The Fonts.FLA file

Switch to the Fonts.FLA file and show the Library. Press Ctrl-L to show it if it’s not already showing.

Then, Right Click in the empty space and choose New Font:


You’ll get the Font Symbol editor window. This is where the magic happens (or doesn’t, if you get it wrong).


There’s a lot going on here, so, starting at the top.

  1. The NAME field must NOT be left as just the name of the font, no matter how tempting that may be. I suffixed the normal version of every font I embedded with “Normal”, but it doesn’t really matter. Just make sure it’s NOT the actual name of the font.
  2. The Font field just allows you to pick the font. This means the font you want to embed MUST be actually installed on the machine. A pain, but that’s what ya gotta do.
  3. The Style box will only be enabled when the font you’ve chosen actually has a specific style (Bold, Italic or Bold Italic) defined within the font itself. Most fonts don’t, so this box will likely be disabled. If it IS enabled, choose whichever style you need to embed.
  4. The Faux Bold and Faux Italic checkboxes are enabled when the font doesn’t already define a Bold or Italic style. if you want bold or italic, check the appropriate box. HUGE NOTE: These boxes are ANDed, which means if you check both, you get a faux BOLD/ITALIC font. You do NOT get a bold version of the font and an italic version. This is very important and I’ll get to why in a bit.
  5. You’ll need to check the “Export for ActionScript”, and when you do so, the Identifier field will enable (for ActionScript 2.0 at any rate). Be sure that the name entered here IS NOT the actual font name. It needs to be something different. I usually make it the same as the NAME field above.
  6. And finally, check the Export for Runtime sharing. Since this is going to be an external font resource swf file, we need to export the font so other SWF files can reference it.

I didn’t mention the SIZE file. I’ve put 30 there, but, from what I can tell, you should be able to put just about anything you want. The process of embedding the fonts actually converts the glyph vector outlines into a Flash friendly format, but they’re still vectors, so they can essentially be scaled to any size.

That said, often at small sizes there are hints embedded in the font for particular sizes that might not make it into the embedded font vectors. I’m no font expert though, so I can’t be sure of this.

Fonts, Fonts

What if you need more than one font? What if you need the Bold version of a font? What if, heaven forbid, you need the normal, bold, italic and bold italic versions of the font?

First off, even though it may alarm the Flash purists out there, there are occasions when such things are necessary. The downside, however, is that your fonts.swf file could get rather large quickly. The reason is that you’re actually embedding all the font glyphs into the file. But it’s worse than that.

Flash, treats every style of a font as a completely separate font. So, if you want normal and bold, well, that’s two fonts. Normal, Bold and Italic? That’s three complete sets of glyphs. Normal, bold, italic and bold italic? That’s 4 complete sets of glyphs for that font.

Needless to say, the swf file can get large fast. Something to be aware of at any rate.

So, let’s say you want to include the BOLD version of Tahoma.


Just repeat the above steps, but with Tahoma, the STYLE combobox is enabled (Tahoma has the Bold style predefined). Drop down the Style Combo and select Bold. Then, make sure the Name and Identifier fields are set to SOMETHING OTHER THAN “Tahoma”. I just used “TahomaBold” to keep things simple.

Now, repeat those steps for EVERY FONT and EVERY STYLE of font you want to embed. What’s worse, I looked for quite some time for any way to automate this process and failed. The only way to do it that I could find was completely manually. Yuck!

In the end though, you should have a library pane that looks like this (I’ve dragged all the fonts into the Fonts folder, but you don’t have to).


Again, the KEY TO THIS is that NONE of the font NAME fields or the IDENTIFIER fields can be the same as the actual font.

Flash is smart enough that when you ask for “Tahoma” with a style of Bold, it’ll match things up properly. But if any font is actually named “Tahoma” (i.e. in either of those two fields), Flash will only ever choose that particular named font/style, regardless of what you might ask for. Peculiar, yes, but that’s what it appears to be doing.

First Flash Coding

Filed under Uncategorized

image I had the opportunity to take on a Flash project recently. Never touched Flash before but I’d had it ever since I picked up a copy of Dreamweaver MX (the 2004 version, version 6, I still use FireWorks regularly).

From what I can tell, there’s been lots of improvements to Flash and ActionScript, but mostly in the areas of video and multimedia, which, for this, I didn’t need.

The idea is to create a preview of a text message, with font selection, sizing, coloring, etc. Initially, maybe only a half-dozen options, but eventually, incorporating a plethora of options (wavy text, anyone?).

It took a good deal of web queries and tinkering to get past the initial Flash hurdles (like how the heck to you actually place a movieclip onto the stage, much less create a new movieclip!). Is it just me, or is making the user “create a new symbol”, a completely non-intuitive way of creating a new movie clip? Maybe it’s just the old version. But I’m not sure I want to pay big $$$ to find out if any of that non-sense ever got straightened out.

Initially, I’d placed a chunk of code in the action area for the main frame, (there’s only one frame in this “movie”), but when I ran it, I happened to notice that it was being run over and over again. I’m guessing that’s because Flash, is, at it’s heart, an animation/movie creator, so that made a certain amount of sense.

I also found through combing the help file, that what I probably needed was the OnClipEvent On Load event. But that was only available on an actual movie clip object, and I couldn’t seem to create one of those.

Long story short, I’ve gotten something working in relatively short order, it was less painful than I expected, and in the process, I’ve gained a whole new level of appreciation for those guys out there cranking out Flash games.

System process in Vista running at 100%

Filed under Uncategorized

I’ve had a very strange problem for months now that was intermittent enough to not be overly concerned about, but happening enough to be bothersome.

Basically, every other time I rebooted my system, the “System” process (as listed in TaskMan) would get pegged at max utilization (in my case, on a dual core system, it would hover around 45-50%, but on a single core system, it’d run at near 100%).

This would drag things to almost a standstill. The cursor would move haltingly, apps would take forever to load, and shutting down was interminable.

It happened again this morning, so when I got some time, I started researching it.

Turns out the solution is relatively straightforward, at least in my case.

Vista has a feature called Offline Files. It allows files stored on network drives to be automatically synchronized down to your local system, for access when you are, yes, offline.

However, this feature appears to have some really nasty timeout handling issues, so when network devices actually are offline, it can end up bringing your entire system to it’s knees.

For virtually everyone out there, I’m guessing this feature isn’t actually something you even care about. I certainly don’t. And fortunately, turning it off is easy.

Open the Control Panel, and click Offline Files.


Then, if the first button listed says “Disable Offline Files”, click it. That will disable the offline files features, and, at least so far, through several reboots, has resulted in my system not getting dragged down in the slightest.

And just when I was starting to like Vista<g>

Full Hard Disk Backup under Vista

Filed under Uncategorized

Finally, something that actually works fairly nicely under Vista

Microsoft includes a tool with Vista (I have Vista Ultimate, I’m not sure if this is included on all versions of Vista or not), that can backup your entire harddisk (usually one at a time, but for most people these days, drive C IS their harddrive) all at once, WITHOUT resorting to funky dos boot disks and the like.

It’s called Backup Your Entire Computer (catchy, eh?), and it’s located in the Backup and Restore Center on the Control Panel.


Basically, grab yourself a USB drive big enough to hold your entire C drive, open this window and click the Back up Computer” button.

It could take a while, so USB 2.0 is best, esp if you have several hundred gig to back up.

But, there’s an even handier way to work with it!

The command line utility wbadmin (Windows Backup Administrator) allows you to perform a complete computer backup directly via command line (or, more conveniently, via a batch file).

You run it like this:

wbadmin start backup -backuptarget:k: -allcritical -quiet -vssFull

where k: is the drive letter of the USB drive that you want to backup onto.

Couple that with the Task Scheduler to run this batch file automatically every night and you have a nice, simple way to guarantee that your drive is completely backed up.

And finally, Windows Backup creates a VHD file from your harddrive as the backup. Anyone familiar with Virtual PC might recognize VHD files as Virtual HardDisks.

And that might also mean you could open that vhd file without actually having to restore the entire thing. And you’d be right! Very cool. The details on doing so are fairly involved, but mainly it requires that you install the free Microsoft Virtual Server, if only for the Mount Virtual Hard Disk tool, which comes with Virtual Server.

Once you have that tool installed, you can mount a VHD back up file and it will appear to be just another harddrive on your computer. You can actually copy files from it or to it at will.

It’s not as easy as it should be, but it’s not too tough. Bart DeSmet has a really good description of doing exactly this on his site.

Debugging VSTO problems

Filed under Uncategorized

If you’ve ever worked on a VSTO addin, you may know how frustrating it can be to try debugging problems with them, especially problems of the “my addin isn’t being loaded” variety.

There is a way to get a little more information on the process, however.

Just set the environment variable VSTO_SUPRESSDISPLAYALERTS to “0”, and then restart the Office app of you choice.

Now, instead of just quietly failing, the VSTO loader should be a little more verbose about what’s happening.

In my particular case, it didn’t help all that much, but I could definitely see it helping in many cases.

Microsoft also has a KB article about it, but you’d almost never find it unless you knew what your were looking for up front.

Vista, XP, SQL Server 2005, Workgroups and Connections

Filed under Uncategorized

Whew! The title says it all.

imageI recently had a little problem with my server. Notice the 3 blown caps.

I had my 5 year old daughter take a look. Without pointing out anything in particular, I asked her “Ok, this computer isn’t working right. Any idea why?”

She looked around with a flashlight for about a minute and states “Those 3 batteries look like they’ve gotten dirty. Maybe you need to clean then up?”<g>

So, I’ve got no server as of now.

Fortunately, all my SQL databases I use for testing get backed up every night, so I still have them all. Unfortunately, the SQL Server installation itself was on that blown machine<sigh>.

I’d been wanting to virtualize my server for some time now, so this was the perfect opportunity. I fired up VMWare, cloned an existing XP VM I often use for testing, cleaned it up, put SQL Server 2005 on it, ran the SQL SP2 update, then restored all my DB backups. No problem.

With the VM running on my workstation, I loaded SQL Server Management Studio on my workstation and tried to connect to the virtual server.


(for search purposes, the message is “Login failed for user ‘argos\guest’. (Microsoft SQL Server, Error: 18456)”)

Hmm. I was pretty sure I had things set up right. So I tried SQL Authentication with the SA user and password.

I’m in.

Ok. That’s odd. And why is it trying to connect me as guest? Wait… Originally, my server was running Win2003 Server, so it had DNS setup. With it gone, I’m in workgroup mode. Ah! I didn’t have matching user accounts on this new virtual server and on my workstation. Set up a matching account, and try a remote connection request to the SQL Server from my workstation. Still no dice.

I checked the SQL ERRORLOG file (you can typically find it in C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG), and I end up with this:

2009-02-05 16:11:36.36 Logon       Error: 18456, Severity: 14, State: 11.
2009-02-05 16:11:36.36 Logon       Login failed for user ‘ARGOS\Guest’. [CLIENT:]

That STATE number is the key. A state of 11 means “Valid login but server access failure” (There’s a really good table of error states here).

That was the clue I needed. After way too much googling, scratching my head and trying random things, I eventually came across this post by Jens Suessmeyer.

The short of it is that, under XP anyway, if you are running in a workgroup (ie non-domain) and you have Simplified File Sharing turned on, this will cause SQL Server to ALWAYS force remote authentication requests to fall back to the Guest user. It was only after I’d found the above post that I came across this MSKB article that describes the problem in more detail.

So, it’s off to the Folder Options dialog, I uncheck the Use Simple File Sharing option:


And, no more connection failures!

So, to sum up. If:

  1. You’re using SQL Server 2005 (and likely other versions as well).
  2. You’re running in a WORKGROUP environment
  3. You need or want to use WINDOWS AUTHENTICATION and not just SQL Authentication
  4. You set up a login on your server and your remote machine that exactly match in username and password
  5. You’ve enabled SQL Ports 1433 and 1434 through your firewall.
  6. You can connect via Windows Auth just fine when you run SQL Management Studio from the server
  7. BUT you get a connection error indicating that your trying to connect as GUEST, when you were expecting to connect as your current username.

Then you most likely need to turn OFF Simple File Sharing on the SQL Server machine.

Changing the Windows XP Product Key

Filed under Uncategorized

I was working with a quite old inherited virtual machine today (VMs have a nasty habit of getting old and unpatched), and I needed to have SP2 (actually XP SP3 is out now) on it (to install SQL Express, among other things).

The problem was, this VM had a installation of XP, no service packs, using a product key who’s ancestry was, shall we say, questionable, at best.

Of course, I have several valid product keys from MSDN subscriptions, so I’m completely legit. But I needed to get this VM squared up so I could get products installed on it.

In the past, I’ve used a technique I found online whereby you edit a registry entry to invalidate your current activation (and thus force Windows to want to reactivate itself), then you run the msoobe.exe application with a certain command line to relaunch the activation process. Not to hard, but it didn’t work with my legitimate WinXP product keys. I have no idea why not, and there was nothing in any of the messages to indicate what was wrong.

Then I happened across a link to the Windows Product Key Update Tool.

A quick download and it worked perfectly. It properly accepted the product key for XP from my MSDN subscription, updated Windows and reactivated it straight away.

Certainly, a very handy tool to have in the stable!

XAML editor crashes Visual Studio 2008 SP1

Filed under Uncategorized

A week or so ago, I decided to try my hand at a little XAML, so I loaded up VS2008, started up a simple project and created a few forms (or whatever they’re called in WPF speak).

Anyway, I hadn’t gotten but maybe 10 minutes in when VS crashed. Hard crash. No error message, or dialog of any sort, just closed out.

I reloaded the project and tried again. Immediate crash as soon as I loaded up any XAML file.

I let it sit over Thanksgiving (I believe it’s always good to give a system a chance to think about what it’s doing before you really lay into it<g>) and tried again today.

No joy.

So I started researching the issue and came across a pretty active thread about just this problem.

Long story short, uninstall Power Commands for Visual Studio 2008 if you’ve got it installed and have VS2008 SP1. It doesn’t look like PowerCommands has changed since April and there definitely seems to be issues with it and SP1.