User Hostile User Interfaces

I have had the pleasure of trying to make the VB6 Package and Deployment wizard work.

I know that this is 10 years old but given that I had to learn Clipper earlier this year…

The package and deployment wizard is the tool supplied with VB6 to bundle up the executables and create an installation package.  This is theoretically quite straightforward until you try to make some obvious changes.  For various configuration reasons the location of the package file has moved drive.  Not a big deal – I should be able to use the UI to edit the attached resources and move them.  However you can remove exiting items but if you try to add it it complains that the file already exists.  So I go through the process and output the package creation file.  The package creation file is simply and INI file – a text document containing name=value pairs within [Section Name] blocks.  Great – a quick search and replace later and the files to good to go.  Reload the package deployment wizard and it fails to start with a 457 error.  It turns out that the PDW will write distinct entries to the file that it can’t display.  If you have items that have repeated keys that differ only by case then it will not load.  Previously this had been hidden due to them being on different drives – after the search and replace the names mix up.  It takes a lot of sorting of sections and careful comparisons to eliminate the duplicates.

Fully service packed applications at version 6 need to be more stable than this.

VB6 References are also a nightmare.  You use the reference form to select the new location to set them.  However until you close and reopen the Reference list the origonal location is displayed.  Great example of WYSAWYG.

VB6 Build before debug – this will happily say that the application is fine.  Try the make option and it is a different story.

sed and grep save the day

I use thunderbird for one of my less recently used email accounts – I get a lot of spam.

I was trying to use a website to fill in a survey  but I forgot my password so they emailed it to this email account.

Of course the email goes straight into the spam folder.  This is rather large and I cannot browse it.

Easy solution: copy  the Junk file to my linux box.

Find the location in the file of the retailer:

grep -in retailer Junk

This lists the location in the file of the retailer.

The first entry was on line 920123 

sed -e”1,920000d” Junk > Junk.tail

I can now edit Junk.tail and find the temporary password.

Can you find a quicker solution? 

Windows Developer Power Tools

This is a great book.  It provides descriptions, why to use and how to use guides for over 170 free windows devlopment tools.  Scott Hanselman provides the foreward.

 It has its own website.

I can definately see myself plugging several of the tools myself.

For example I have used, but forgotten about SourceMonitor. This allows analysis of an entire codebase to allow detection of excessively long methods, overlyly complex methods, uncommented code.

VB6 is dying

VB6 was consider flexible largely due to the suite of third party controls available.

Out of the box VB6 was always much weaker than it’s rivals.

The problem is that while MS will be releasing the VB6 runtime for the foreseeable future, I can’t see the add on developers maintaining VB6 versions indefinately.  For example certain grid controls are no longer supported and the documentation is unavailable. 

Escape Route From VB6

We have an (effectively) undocumented VB6 application.  The fun part is that some of the third party components that we used are now unsupported (since 2003).

Management will not authorise a full rewrite – but does want to extend the application.  Our new applications are in C#. The VB.NET translation wizard leaves 100’s of errors and fails to compile.

Here is an article on embedding a .NET form into a VB6 application.

Here is an article on embedding a VB6 form into a .NET application.

These may provide us enough of a quick win to allow us to use supported controls for new development yet keep the existing application.