Yes, you've been told it's dead, gone and to move off this old beast of a system from 1998 but here you are, tasked with fixing an old legacy app so let me share that I've been there and how I got around some of the issues. These are:
- Install issues on Windows 10.
- A workaround to code that seemed fine but failed.
- What may never work again.
Installing VB6
Installing Visual Studio 6.0 from 1998 is a challenge. Be sure to have your media ready and if need be, print out the instructions so you can follow them step by step.
I used this search for how to isntall -> https://www.google.com/search?q=Install+Visual+Studio+6.0+on+Windows+10
This seems to work but badly and you have to deal with the install appearing to fail but I was able to pick up the pieces by copying the missing dao35.dll from my Visual Studio 6.0 CD (or VB6 Media) to the folder where the VB6.EXE is. This might be C:\Program Files (x86)\Microsoft Visual Studio\VB98 on a stock install.
Before you try to run VB6, be sure to install Service Patch 6.
When you run VB6 for the first time it may cough up errors and complaints but plow ahead and when it's done, quit and try again. Here it stoped complaining on the second run.
Be sure to experiment with the Compatibility Tab on the VB6.EXE file. For me the usual sluggish behavior in dragging items around vanished when I set compatibility to Vista Service Pack 2.
An odd workaround
Our old app uses images for some buttons and VB6 would complain the images couldn't be found. The images were there but the fix was simple but unintuitive. The current directory appeared to be somewhere else and I have yet to find out why CurrDIR() returns what we expected yet the following code was required. Let's hope this helps a few out there.
Debug.Print CurDir() ' Show in IDE
Debug.Print App.Path ' Show in IDE
ChDir (App.Path) ' Set the CurDir()
What may never work again
So that's the basics to get VB6 up and running again and the odd issue I bumped into and now to what we had to forget about. What I can't seem to find a fix for is the old SQL interface system. That's in DAO but that doesn't seem to have a patch or fix so if you rely on any SQL you need to inform your management that it's dead.