This documentation is archived and is not being maintained.

Working with Both Visual Basic 6.0 and the Current Version of Visual Basic 

Both Visual Basic 2005 and Visual Basic 6.0, as well as applications created in either language, can be installed on the same computer and run at the same time.

Components written in Visual Basic 2005 can interoperate with COM components written in earlier versions of Visual Basic and other languages. For example, you can drag an ActiveX control written in Visual Basic 6.0 onto a Visual Basic 2005 Windows Form, use a Visual Basic 6.0 COM object from a Visual Basic 2005 class library, or add a reference to a Visual Basic 2005 library to a Visual Basic 6.0 executable.

Components compiled with Visual Basic 2005 have subtle run-time differences compared to components compiled with Visual Basic 6.0. Because Visual Basic 2005 objects are released through garbage collection, when objects are explicitly destroyed, there may be a lag before they are actually removed from memory. There are additional differences, such as data type and other language changes. The combined result of these differences is that Visual Basic 2005 applications will have similar but not identical run-time behavior to Visual Basic 6.0 applications.

In addition, Visual Basic 2005 makes binary compatibility between Visual Basic 2005 components and those in Visual Basic 6.0 unnecessary. Components now have a more robust versioning and deployment system, files can be deployed by simply copying to a directory, and upgrading to a new version of a component is as simple as replacing the old file with a new file. All you have to do is ensure classes and methods are compatible with the previous versions.

See Also