Volume 33 Number 6
[Don't Get Me Started]
Ol’ Man River
By David S. Platt | June 2018
I just paid my income taxes, so I’m feeling cranky. To cheer myself up, I’m going to kick over my all-time favorite hornets’ nest: Visual Basic 6. My three previous columns on it (msdn.com/magazine/jj133828, msdn.com/magazine/dn745870 and msdn.com/magazine/mt632280) have generated far more mail, pro and con, than anything else I’ve ever written. Once again, I’ll goad the developers who continue to love VB6, and those who love to hate it and them, into spectacular combat, for my amusement and yours. Damn, this is fun.
VB6 just got an important boost from Microsoft blogger Scott Hanselman. In his post (bit.ly/2rcPD0f), Hanselman shows how to configure a VB6 app to be hosted in the Windows 10 Store, using the Microsoft Desktop Bridge infrastructure and tools (bit.ly/2HFVzcc). That’s huge, as hosting an app in the store means that Microsoft is at least somewhat vouching for its compatibility and content. Potential purchasers perceive it as sort of a Good Computing Seal™—perhaps not as strong as Apple’s, but definitely much stronger than Google’s. You may have to modify your app somewhat to meet the store’s policies (bit.ly/2HHUXiq), such as removing “excessive or gratuitous profanity.” (Well, %*&#$ that, I say. Oops.) But this should be relatively easy.
These bridging tools instruct Windows 10 to enforce good behavior on regular, not-otherwise-compliant, Win32 apps. For example, Windows 10 (when properly instructed) will use a separate registry file to handle changes the app might make to the system registry, so it can’t clobber any other apps or resources. For another example, any changes the app might make to the file system are automatically redirected to the ApplicationData.LocalFolder, where Windows 10 standards require them to reside. You can see this strategy at bit.ly/2I3n0fG.
But wait! There’s more! Microsoft has exposed many of the Windows 10 salient features to native Win32 apps (see bit.ly/2JFPgSI). VB6 apps are, by definition, native Win32 apps. It’s only a matter of time until someone writes a COM bridge to Universal Windows Platform, so VB6 can use it easily. I can imagine VB6 apps doing things like updating live tiles. These life-extenders should drive VB6 detractors barking mad.
Maybe this is why Microsoft won’t release VB6 as open source, as it has for most of its tools. It might be worried that the community would change it to the point that Microsoft couldn’t provide this “It Just More-or-Less Works” (IJM-o-LW) compatibility in the future.
I rarely use VB6 for commercial software development, as its tradeoffs are not usually the right set for my clients today. But I do have it installed on my experimental network for testing. I have a big problem (not an issue, see my old column on “Weasel Words,” msdn.com/magazine/ff955613) with people who have a big problem with other developers’ choices. Why do you care what someone else uses? Are you a Puritan as H.L. Mencken describes them: someone who lies awake at night with the haunting fear that someone, somewhere, may be happy?
VB6 programmers chose a different set of tradeoffs than you did. Yes, you get frustrated, virtuously slogging through infrastructure, while they ignore scalability and robustness and plunge merrily ahead. No, they probably don’t understand the underlying COM very well—almost nobody does these days. When they inevitably get in trouble, I’ll bail them out (for a fee, of course, see graybeardsoftware.com). That’s their call. Mind your own damn business.
With these latest improvements to compatibility, I foresee at least another ten years of life for VB6. And I’ll bet you anything that this support gets renewed in Windows 11 and 12, or whatever they’re called by then. Another decade of driving the puritans crazy. I can dig it.
I’ve likened VB6 to a cockroach, a bus and a knuckleball. Today VB6 continues to cut a path to working apps, eroding its way through new obstacles, as the Mississippi River cuts new pathways through its delta to the sea, even as the silt it carries clogs the old ones. Like Ol’ Man River, VB6 just keeps rollin’ along.
Note: a beautiful clip of this song, sung by Paul Robeson in James Whale’s classic 1936 film version of “Show Boat,” is online at bit.ly/2JJFv66. It’s worth a listen.
David S. Platt teaches programming .NET at Harvard University Extension School and at companies all over the world. He's the author of 11 programming books, including “Why Software Sucks” (Addison-Wesley Professional, 2006) and “Introducing Microsoft .NET” (Microsoft Press, 2002). Microsoft named him a Software Legend in 2002. He wonders whether he should tape down two of his daughter’s fingers so she learns how to count in octal. You can contact him at rollthunder.com