Export (0) Print
Expand All

Things to Consider Before Upgrading

Visual Basic .NET represents a major shift from previous versions of Visual Basic. Because it was designed from the ground up to take advantage of the .NET Platform, there are many areas where compatibility with previous versions is broken.

Note   Visual Basic .NET and Visual Basic 6.0 can be installed on the same computer and run at the same time. Applications written in Visual Basic .NET and Visual Basic 6.0 can be installed and executed on the same computer. Components written in Visual Basic .NET can interoperate with COM components written in earlier versions of Visual Basic and other languages.

In most cases you will want to upgrade your Visual Basic 6.0 applications to Visual Basic .NET so that you can take advantage of the benefits of the .NET Platform as you continue development. There are, however, situations where you may wish to continue development in Visual Basic 6.0 rather than upgrading. Some of the factors in deciding to upgrade an application include features that aren't supported in Visual Basic .NET, and the amount of rework needed due to incompatibility and architectural considerations.

Unsupported Features

The following features from Visual Basic 6.0 are no longer supported in Visual Basic .NET. For more information, see Preparing a Visual Basic 6.0 Application for Upgrading.

  • OLE Container Control   There is no equivalent in Visual Basic .NET. Applications that depend on this control should be left in Visual Basic 6.0.
  • Dynamic Data Exchange (DDE)   DDE methods are no longer supported. Applications that depend on DDE should either be revised to use another method of inter-application communication or should be left in Visual Basic 6.0.
  • DAO or RDO Data Binding   Data binding to a DAO or RDO data source isn't supported in Visual Basic .NET; the Data control and the RemoteData control have no equivalent. DAO and RDO can only be accessed via code. Applications that rely on DAO or RDO data binding should either be updated to use ADO or should be left in Visual Basic 6.0.
  • Visual Basic 5.0 Controls   Visual Basic 6.0 included the Visual Basic 5.0 versions of the Windows Common controls and the Data-Bound Grid control. These controls are incompatible with Visual Basic .NET. Applications that rely on these controls should either be updated to use the 6.0 versions or should be left in Visual Basic 6.0.
  • DHTML Applications   There is no equivalent in Visual Basic .NET. However, DHTML applications can interoperate with Visual Basic .NET technologies.
  • ActiveX Documents   There is no equivalent in Visual Basic .NET. However, DHTML applications can interoperate with Visual Basic .NET technologies. ActiveX documents should either be rewritten as User Controls, or left in Visual Basic 6.0.
  • Property Pages   There is no equivalent in Visual Basic .NET. If your application depends heavily on property pages, it should be left in Visual Basic 6.0.

Determining the Amount of Rework Required

Due to the many differences between Visual Basic 6.0 and Visual Basic .NET, most applications will require some rework for items that can't be mapped directly or are otherwise incompatible. The amount of rework required depends on a number of factors, including the type of application, features, and the language constructs used.

The easiest way to determine the amount of rework required is to run the Upgrade Wizard and view the list of issues in the Upgrade Report. When an application is upgraded a new copy is created; the original application is left intact. If, after viewing the report, you decide not to upgrade, you can simply delete the new project and continue development in Visual Basic 6.0.

The following are additional considerations that may factor into your upgrade decision.

  • Single-tier Database Applications   Because data binding to DAO isn't supported, simple applications using controls bound directly to a local database (such as one created with Microsoft Access) may require a significant amount of rework.
  • Visual Basic Add-ins   Because Visual Basic .NET uses the Visual Studio integrated development environment, the object model for extensibility is significantly different than that of Visual Basic 6.0. Add-ins will require a considerable amount of rework.
  • Games   Applications relying on specific performance characteristics of Visual Basic 6.0, such as arcade games, will require rework because Visual Basic .NET has different performance characteristics.
  • Graphics   There is no support for the graphics methods of forms or for the shape and line controls. Applications that use these features extensively to draw on forms will require considerable rework.
  • Drag and Drop Functionality   The models for drag and drop functionality are significantly different; any code performing drag and drop actions will need to be rewritten.
  • Variants   When an application is upgraded, the Variant data type is converted to Object. If an application is heavily dependent on variants, this conversion can introduce some subtle differences in the application's behavior. For example, in Visual Basic 6.0 the expression IsObject(Variant) evaluates to false; in Visual Basic .NET it changes to IsObject(Object), which evaluates to true.
  • Windows APIs   Due to language changes, many calls to Windows APIs will need to be revised or replaced with .NET Framework functions.

See Also

Preparing a Visual Basic 6.0 Application for Upgrading | Why Upgrading is Necessary | Upgrading Applications Created in Previous Versions of Visual Basic

Show:
© 2014 Microsoft