Does the VB6 IDE run on Windows 7 / 8 / 10 64-bit?

ghz 7months ago ⋅ 295 views

We're approaching a point of replacing several of our developer PCs and would like to move up to 64-bit to maximize the hardware/life of the PCs but we also need to support several legacy VB6 applications. That said, Microsoft says it's not supported, but that doesn't necessarily mean it doesn't work. However, support's not important on a dead tool so long as it's functional.

  • Does it work?
  • Are there any pitfalls/workarounds needed to get it running?
  • Does the installation of Service Pack 6 require any special considerations? (SP6 is basically essential for VB6 use)

Answers

Running VB6 on a 64-bit version of Windows is possible, although it's officially unsupported by Microsoft. Many developers have successfully run VB6 on 64-bit systems by following specific steps and workarounds. Here's what you need to know:

Installation Process

  1. Install VB6 IDE:

    • Run setup.exe from the Visual Basic 6 installation CD.
    • If you encounter the "Setup is not compatible with this version of Windows" message, you may need to run the installer in compatibility mode. Right-click on setup.exe, go to "Properties," select the "Compatibility" tab, and choose "Run this program in compatibility mode for Windows XP (Service Pack 3)."
    • During installation, when prompted about data access components, choose to continue the installation without installing the outdated components.
  2. Service Pack 6 (SP6):

    • After installing the VB6 IDE, download and install Visual Studio 6.0 Service Pack 6.
    • If the SP6 installer fails, try running it in compatibility mode as well.
  3. Update msjava.dll:

    • VB6 setup might fail due to a missing msjava.dll. You can resolve this by downloading the msjava.dll file from a trusted source and placing it in the C:\Windows\SysWOW64 directory.
  4. VB6 IDE Compatibility Fix:

    • After installing, you might face issues with the IDE. Set vb6.exe to run in compatibility mode for Windows XP SP3 and enable "Run this program as an administrator."

Common Pitfalls and Workarounds

  1. OCX and DLL Registration:

    • Some VB6 components (like OCX controls) may need to be manually registered. Use the regsvr32 tool to register these components in the C:\Windows\SysWOW64 directory for 32-bit components.
  2. Data Access Components:

    • Legacy data access components (e.g., DAO, RDO) might not work properly. Consider using ADO or upgrading to a more modern data access technology if possible.
  3. IDE Performance:

    • The VB6 IDE might not perform optimally on a 64-bit system. You can mitigate some issues by disabling hardware acceleration in the display settings or using a virtual machine with an older OS that supports VB6 natively.

Running VB6 Applications on 64-bit Windows

  1. Compiled VB6 Applications:

    • Most VB6 applications should run on 64-bit Windows without modification, as they are 32-bit applications running under WoW64 (Windows 32-bit on Windows 64-bit).
  2. API Declarations:

    • Be cautious with API declarations in your VB6 code. Some may require adjustments to work correctly in a 64-bit environment, particularly if they use pointers or handle types. Always ensure you're using the correct data types and API calls.
  3. Testing:

    • Thoroughly test your VB6 applications on the new 64-bit environment to identify any runtime issues or incompatibilities.

Summary

While running VB6 on 64-bit Windows is feasible, it requires some careful setup and potentially some adjustments to your code and development environment. Here are the key steps:

  1. Install VB6 IDE in compatibility mode.
  2. Apply Service Pack 6.
  3. Register necessary components.
  4. Make necessary code adjustments for API calls and data access.

By following these steps, you can continue to support and develop legacy VB6 applications on modern 64-bit systems.