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.

comments powered by Disqus

Featured

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube