Running the Migration Wizard on an Add-in

 < Free Open Study > 

Preparing to Migrate an Add-in

There are several major areas that simply will not upgrade from VB 6.0 to .NET. The first thing you must do is make sure that the application you want to migrate will compile correctly and completely in VB 6.0. The .NET Migration Wizard will not accept any application from an earlier version of Visual Basic except VB 6.0. If you have an application that is from an earlier version of Visual Basic, you must bring it into VB 6.0 and clean up any errors before attempting to migrate to .NET.


You should not have any problems moving a VB 5.0 application to VB 6.0. However, you do have to do it. Also, you should have a copy of VB 6.0 on the machine that you want to use to migrate the application.You should compile the VB 6.0 application to ensure that all components, including third-party components, can be found on that machine. Otherwise, the wizard will not be successful in upgrading your application.

Table 13-1 is a brief summary of the major areas that you should be aware of before upgrading. You may or may not decide to do anything in these areas, but if you do not, you will likely see a lot of "not upgraded" messages in the code output from the wizard.

Table 13-1: Preparing to Upgrade to .NET




.NET introduces an advanced version of ADO called ADO.NET. Although DAO and RDO can still be used, .NET does not support bound controls that use these data access packages. If you are using DAO and data binding, you should consider converting to ADO or leaving the application in VB 6.0. In the case of an add-in, you will have to convert to ADO.


Several of the graphics objects, such as Line and Shape controls, are not supported by .NET.

Printer object

The Printer object is not supported by .NET. All printing operations will have to be rewritten.

Clipboard object

This object is still in .NET, but the SetData method has been changed to SetDataObject, and a cursory glance at the diagnostic might cause you to think Microsoft has taken out the Clipboard.

Drag and drop

The drag-and-drop operations of your applications will have to be rewritten.


All variants will be converted to Object, and that can cause some subtle problems.


Some API calls may need to be revised or replaced with .NET Framework classes.


The GoSub statement is no longer supported in .NET. You must rewrite code that uses GoSub.

Option Base

The Option Base statement has been removed from the language. Arrays must be based at zero. This was done to maintain compatibility between Visual Basic .NET and other .NET languages. Code using arrays with a base other than zero need to be examined.


Dates are not stored as Doubles in .NET. If you have been doing calculations counting on the storing of dates as Doubles, you will have to rewrite the code.

Legacy keywords

The use of such legacy keywords as LSet, VarPtr, ObjPtr, StrPtr, Def, and computed GoTo are not supported in .NET.

 < Free Open Study > 

Writing Add-Ins for Visual Studio  .NET
Writing Add-Ins for Visual Studio .NET
ISBN: 1590590260
EAN: 2147483647
Year: 2002
Pages: 172
Authors: Les Smith © 2008-2017.
If you may any questions please contact us: