How to Use Visual Basic Vers 1.0, 2.0, & 3.0 on Same Computer

Last reviewed: June 21, 1995
Article ID: Q94697
The information in this article applies to:

- Standard and Professional Editions of Microsoft Visual Basic for

  Windows, versions 2.0 and 3.0
- Microsoft Visual Basic programming system for Windows, version 1.0

SUMMARY

This article describes how to set up Visual Basic version 2.0 or 3.0 and keep Visual Basic version 1.0 on your computer. There are two issues involved when attempting to maintain two versions of Visual Basic on the same computer. First, you need to set up Visual Basic version 2.0 or 3.0 so that it does not overwrite the Visual Basic version 1.0 files. Second, you must manage the compatibility between the two versions.

MORE INFORMATION

To keep Visual Basic version 1.0 on your computer, install Visual Basic version 2.0 or 3.0 in a different directory. By default, the Visual Basic version Setup program attempts to copy the files to the \VB directory, but it will ask you if you want to put it in a different directory.

If you have the Professional Toolkit for Visual Basic version 1.0 and you want to preserve the custom control (or .VBX) files, place them in a directory other than \WINDOWS or \WINDOWS\SYSTEM. The Setup program for the Professional Toolkit for Visual Basic 1.0 gives you the option to place a copy of the custom control files in a separate directory. These files are normally placed in a subdirectory called VBX in the Visual Basic directory.

If you requested an extra copy of the custom control files, they'll remain separated from the Visual Basic version 2.0 custom control files, so you do not need to do anything. However, if you didn't request a copy, copy the Visual Basic version 1.0 .VBX files from the \WINDOWS\SYSTEM directory to another directory before running the Visual Basic version 2.0 Setup program. In addition to the VBX files, you also need to copy GSW.EXE, GSWDLL.DLL, and COMMDLG.DLL from the \WINDOWS\SYSTEM directory to the other directory.

The Setup program for the Visual Basic Standard and Professional editions copies the .VBX, .EXE, and .DLL files to the \WINDOWS\SYSTEM directory. If a .VBX, .EXE, or .DLL file already exists in the \WINDOWS\SYSTEM directory with that name, the Setup program changes the file extension from .VBX, .EXE, or .DLL to .OLD.

If you already ran the Visual Basic version 2.0 or 3.0 Setup program, you can recover the version 1.0 custom control files by copying the .OLD files from the \WINDOWS\SYSTEM directory to a different directory. Then rename the .OLD files giving them the appropriate extension (.VBX, .EXE, or .DLL). For example, rename GSW.OLD to GSW.EXE, GSWDLL.OLD to GSWDLL.DLL, and COMMDLG.OLD to COMMDLG.DLL. Then rename all other .OLD files to .VBX files.

For the most part, the code for Visual Basic version 1.0 applications is upwardly compatible. In other words, you should be able to run all version 1.0 applications in version 2.0 or 3.0 with few or no changes. When you load a version 1.0 project into Visual Basic version 2.0 or 3.0, you will be informed that your files are in the old format. When you save the project, Visual Basic version 2.0 or 3.0 converts the files into the new version 2.0 or 3.0 format. Once the version 1.0 project files are saved in the new version's format, you cannot load the project files back into Visual Basic version 1.0.

Once you install Visual Basic version 2.0 or 3.0, any version 1.0 .EXE files that use custom controls will likely use the version 2.0 or 3.0 custom controls. This happens because when you installed the later version, its controls replaced the earlier version's controls in the \WINDOWS\SYSTEM directory. This should work well because the Visual Basic version 2.0 Professional Toolkit controls are upwardly compatible from the version 1.0 Professional Toolkit controls.

If you need to use Visual Basic version 1.0 custom controls, put them in the same directory as the version 1.0 .EXE that uses them. Then the .EXE will find the version 1.0 controls first. However, there is no guarantee the version 1.0 custom controls will be used because another .EXE may have already loaded the version 2.0 controls.


Additional reference words: 2.00 1.00 3.00
KBCategory: kbenv kbprg
KBSubcategory: EnvtDes


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 21, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.