Classic VB Corner

The Only Add-In Always Used

There's only one add-in that I have auto-loaded every time I fire up the Classic VB IDE. After disappearing from the market, it's back now, and it's free!

I can't count how many times over the years I've seen folks express "really weird" issues in the Classic VB IDE, and how often these can be solved with the simple advice: "First, unload all add-ins, then restart the IDE." As much as these little tools help, they can almost as often confound. This is unfortunate, because some of them are real jewels.

I'm sure everyone has a favorite add-in that they just can't imagine living without. (Leave a comment at the end of this column if you'd like to share your favorite.) My own is vbAdvance, written by Peter Young. I have it configured to load every time I start VB5 or VB6. No other add-in in my arsenal is similarly enabled, and honestly none other is so critical to the product I produce.


Most add-ins are oriented toward specific IDE tasks -- formatting or analyzing code, constructing forms or positioning controls, and so on. In contrast, vbAdvance is all about the resulting binary file. It injects itself between the compiler and linker to modify the final EXE or DLL output, thus opening up options otherwise not available to ClassicVB authors.

For example, I write a lot of console applications. Without vbAdvance, you have to resort to post-processing the executable to toggle a bit in its PE header or relink after compilation. Both are tedious steps, in comparison to simply marking a checkbox in the vbAdvance Settings dialog. From that point onward, this project will always be linked such that Windows recognizes it as a console application rather than a windowed one.

I've also used vbAdvance to devise custom DllRegisterServer and DllUnregisterServer functions, so that when my DLLs were registered or unregistered, I could control what other activities simultaneously took place. This allowed me to implement a trial period check algorithm, whereby the time of first registration was stored away in a "very secret" place so that it could later be checked against the agreed on trial period. The failure to provide for exported functions for tasks such as this is one of the biggest omissions in ClassicVB, but vbAdvance fills this need nicely.

There are numerous other settings "that VB forgot" you'll come to love. Specifying an application icon for a formless application is just another dialog entry. Need startup or teardown notification in your DLLs? It's there via an exposed DllMain entry point. Another checkbox will automatically inject an XP manifest into your EXE, and you just need to add a single call to InitCommonControls to insure support for XP themes. Want to write a Control Panel application?

Unfortunately for Pete, I'm what might be termed a niche customer. Apparently, mainstream Classic VB folk concentrate on GUI database stuff. Go figure. Bottom line is, vbAdvance was simply never the revenue-generation machine it needed to be to sustain the sort of support burden offering these esoteric functions turned out to be. So, after several years as a commercial product, the white flag was waved and it became an unsupported freeware offering. Time passed, the domain expired and vbAdvance pretty much disappeared from the scene.

This development disappointed me, as people continued to ask how to do things I knew were incredibly easy with this powerful tool. One day, a couple of months ago, I wrote Pete an e-mail asking how things were, "whatever happened" and so on, and, well, long-story short, he has agreed to allow me to host downloads of this marvelous add-in on my Web site.

It's 100 percent freeware, and 100 percent unsupported.

But there are folks who have a fair bit of history with it and would likely have ideas if you run into problems. Just swing by the microsoft.public.vb.general.discussion newsgroup to find the diehards. There are also a few handy demo programs that come with the download, including a complete drop-in ready Console module I wrote.

If you've been reading my columns for years, I'm pretty sure that you, too, fit the profile for vbAdvance -- go download it! Even if you don't find immediate utility in it, the day will come when you can't do without one of the many enhancements it brings to Classic VB. It definitely belongs in your toolbox.


About the Author

Karl E. Peterson wrote Q&A, Programming Techniques, and various other columns for VBPJ and VSM from 1995 onward, until Classic VB columns were dropped entirely in favor of other languages. Similarly, Karl was a Microsoft BASIC MVP from 1994 through 2005, until such community contributions were no longer deemed valuable. He is the author of VisualStudioMagazine.com's new Classic VB Corner column. You can contact him through his Web site if you'd like to suggest future topics for this column.

Reader Comments:

Mon, Aug 2, 2010 Dirk Wuppertal, Germany

MZ-Tools is my preferred addin. vbAdvance adds other important aspects, but e.g. the dll feature does not work or the documentation has gaps.

Sat, Feb 6, 2010 Markus Germany

MY favorite add-in is 'MZTools' (a collection of useful functions for the VB IDE). http://www.mztools.com/v3/mztools3.aspx

Fri, Feb 5, 2010 Paul Melbourne

vbAdvance sounds exactly what I'm looking for...except it doesn't seem to work. I want to customise DllRegisterServer but I get errors regsitering even the included example DllRegisterServerSample.dll. Pity.

Mon, Jul 13, 2009 Richard Turnbull Melbourne, Australia

I have 2 add-ins that I find indispensible. MZ Tools provides so many useful tools. I mainly use it for the line numbering, so that I can use ERL in my error routines, but it so much more. Smart Indenter is brilliant for keeping the source code in its place.

Sat, Jul 11, 2009 Mark Hurd Cherry Gardens, South Australia

MZ Tools for me too. And I used Matthew Curland's console add-in last time I needed to build a command line app. Finally, to workaround the VSS 2005 Add-in bug, I use my add in: see http://connect.microsoft.com/VisualStudio/feedback/Workaround.aspx?FeedbackID=196185 and download it from http://members.ozemail.com.au/~markhurd/VssFixAddIn.zip

Fri, Jun 19, 2009 MarkJ Cambridge

There's a list of VB6 tips on StackOverflow that includes quite a few add-ins http://stackoverflow.com/questions/664370/your-favorite-visual-basic-6-tools-and-tips

Fri, Jun 19, 2009 Ant Waters

I always use a couple of Add-Ins I wrote that I wouldn't do without:

1) Find in files, to search all the files in a project GROUP

2) Close IDE windows - does what is says on the box!

I'm happy to distribute the (unsupported) code if anyone is interested.

Wed, Jun 17, 2009 Florida

I second the comment in regards to MzTools. It is the 1 add-in I always make sure is installed with my VB6 IDE.

Wed, Jun 17, 2009 Didrik Surrey, UK

I love the post-build type library modifier in Matthew Curland's "PowerVB" tools, available with his Advanced Visual Basic 6 book.

Wed, Jun 17, 2009 Darren Doody Adelaide, Australia

Like Karl, vbAdvance is the only "always on" add-in in my Classic VB portfolio. Thanks to Pete for the tool and to Karl for continuing to make it available.

Tue, Jun 16, 2009 Brad Jensen

My favorite VB6 addin is one one our programmers wrote called AddDebug. It adds line numbers to every source module, and copies in a default error handling routine in each procedure, and writes the resulting source to a /debug subdirectory. It's smart enough to turn itself off when it sees on error resume next and then back on on on error goto 0.

Tue, Jun 16, 2009 gis phan Below Long's Peak

MZ Tools is the add-in that I cannot live without.

Add Your Comments Now:

Your Name:(optional)
Your Email:(optional)
Your Location:(optional)
Comment:
Please type the letters/numbers you see above