How To Port VB 3.0 projects w/ .Vbx to VB 4.0 16-bit & 32- bit (138531)



The information in this article applies to:

  • Microsoft Visual Basic Standard Edition, 32-bit, for Windows 4.0
  • Microsoft Visual Basic Professional Edition, 16-bit, for Windows 4.0
  • Microsoft Visual Basic Professional Edition, 32-bit, for Windows 4.0
  • Microsoft Visual Basic Enterprise Edition, 16-bit, for Windows 4.0
  • Microsoft Visual Basic Enterprise Edition, 32-bit, for Windows 4.0
  • Microsoft Visual Basic Standard Edition for Windows 3.0
  • Microsoft Visual Basic Professional Edition for Windows 3.0

This article was previously published under Q138531

SUMMARY

You can convert existing Visual Basic 3.0 projects into projects that can be loaded in Visual Basic 4.0 (both 16-bit and 32-bit versions). If a Visual Basic 3.0 project that contains .vbx files is loaded in Visual Basic 4.0, Visual Basic 4.0 (both the 16-bit and 32-bit versions) automatically "morphs" the .vbx file into the corresponding .ocx file (16-bit or 32-bit) in the new project as long as there is an entry in the Vb.ini file that allows Visual Basic to know which .ocx file the .vbx file should be "morphed" to. Also, you should make sure that the .ocx file pointed to in Vb.ini is in the location specified. The 32-bit edition of Visual Basic 4.0 requires that all Visual Basic 3.0 forms be saved as text for the conversion to work correctly.

MORE INFORMATION

For example, if an existing Visual Basic 3.0 project contains Threed.vbx, the corresponding entries must be present in Vb.ini for both the 16-bit and 32-bit versions of Visual Basic 4.0. Both versions of the threed .ocx file should be present in the specified directories:

16-bit

[VBX Conversions16]
threed.vbx=
{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}#1.0#0;C:\WINNT35\SYSTEM\threed16.ocx
				

32-bit

[VBX Conversions32]
threed.vbx=
{0BA686C6-F7D3-101A-993E-
0000C0EF6F5E}#1.0#0;C:\WINNT35\System32\threed32.ocx
				

When you try to open an existing Visual Basic 3.0 project with .vbx files in Visual Basic 4.0 (16-bit or 32-bit), a dialog box with a list of all custom controls to convert is displayed and will prompt you to make the conversion. If you choose to make the conversion, the corresponding .ocx files will be automatically included in the new Visual Basic 4.0 (16-bit or 32-bit) project. If you choose not to convert, Visual Basic 4.0 16-bit will retain the original .vbx files in the new Visual Basic 4.0 project, but Visual Basic 4.0 32-bit will simply not include the original .vbx files.

All .vbx files that are to be converted must exist on the computer where the conversion is taking place. If one or more .vbx files are missing, Visual Basic 4.0 will give the following error message for each missing .vbx file:
File not found: 'vbxname.vbx' -- Continue Loading Project?

There is no way to avoid this message other than by ensuring that each .vbx file is present on the system that is performing the conversion.

Modification Type:MinorLast Reviewed:7/1/2004
Keywords:kbhowto KB138531