Converting a Visual Basic 6 business application to the .NET Framework platform
is a slow, costly, and error-prone job that requires a deep knowledge in all the
subtleties of both VB6 and VB.NET languages. While automatic conversions tools previously
available on the market can help, they fail to significantly simplify this process
to the point where it becomes truly cost-effective. Not surprisingly, many software
companies have postponed the decision to migrate their applications to VB.NET or
decided to do it without an automatic translation tool. VB Migration Partner can
make the difference in this respect.
VB Migration Partner is an innovative VB6 conversion tool created by a team of renowned VB and VB.NET experts. It supports all the main
VB6 features and controls, and delivers VB.NET applications with significantly fewer
compilation and runtime errors than those produced by other conversion tools.
Our tests on hundreds of randomly chosen open source applications show that VB Migration
Partner correctly converts 999 out of one thousand statements.
VB Migration Partner relies on a sophisticated code parsing and analysis engine,
that can handle VB6 project groups as well as constructs that have
no direct equivalent in the .NET Framework world. The code generation module and
the powerful refactoring module emit VB.NET code that rivals in quality with code
written by expert .NET developers. Even better, developers can customize the resulting
VB.NET code and can improve the behavior of the converted application while keeping
it in sync with the original VB6 project, thanks to our support for the
convert-test-fix cycle. In spite of all this power, VB Migration Partner
is up to 8x faster than the Upgrade Wizard included in Visual Studio 2005.
At the end of the migration process VB Migration Partner produces accurate reports
about the issues it found together with sophisticated code metrics
on the code being migrated, such as total and average cyclomatic index, maximum
and average depth of control structures, and ratio of comments to code. These reports
can be exported to Microsoft Excel to provide a realistic estimation of time and
cost of the entire migration process.
A closer look
VB Migration Partner owes its superior performance to three factors.
First, a state-of-the-art parser is able to correctly convert language
constructs that are commonly considered as impossible to migrate automatically,
including:
- project groups (.vbg)
- Gosub, On Goto, On Gosub keywords
- arrays with LBound <> 0
- “As New” variables with true auto-instancing semantics
- default members in both early- and late-bound mode
- fixed-length strings and arrays thereof
- Declare statements with As Any and delegate parameters
- user controls, MTS/COM+ components, persistable and bindable classes, and more
Second, an advanced code generation engine delivers high-quality
VB.NET code using code-analysis and refactoring techniques, such as:
- deterministic finalization for IDisposable objects
- automatic initialization of Type blocks that contain arrays and As New objects
- creation of implicitly-declared variables (if Option Explicit is off)
- detection of ByRef parameters that can safely use by-value semantics (if requested,
the ByVal keyword can be inserted automatically)
- basic refactoring, including transforming Exit Function/Property into Return statements
and merging a variable declaration with its initialization (e.g. Dim k As Integer
= 1)
- remarks that flag unused members and unreachable code, with optional removal of
unused Const and Declare statements
- conversion of VB6 resource files to My.Resources.Xxx elements
Third, a full-featured support library dramatically reduces the
differences between VB6 and VB.NET, ensuring that converted applications run as
intended and supporting advanced VB6 features such as:
- the 60+ controls in the VB6 toolbox, with the only exception of OLE Container
and Repeater
- language objects and collections (App, Screen, Forms, Printer, Clipboard, PropertyBag,
etc.)
- virtually all control properties, methods, and events
- control arrays, including arrays of menus and 3rd party controls
- graphic primitives, and user-defined ScaleMode settings
- context menus, support for legacy help files
- DAO, RDO, and ADO data binding, including binding to data controls, ADO.Recordset,
DataEnvironment, ADO consumer classes, and user controls that work as ADO data sources
- creation of new controls at runtime, via control arrays or Controls.Add method
(including support for the VBControlExtender object)
- automatic and manual OLE drag-and-drop
Unlike other conversion tools, VB Migration Partner can be customized and fine-tuned
to behave exactly as intended, by means of pragmas. Migration pragmas are
special remarks that you can add to the original VB6 application and that tell the
migration engine how code must be handled during the conversion step. For example,
the ArrayBounds pragma affects how arrays with nonzero LBound are translated; the
AutoNew pragma dictates how auto-instancing (As New) variables are rendered; the
SetType and ChangeType pragmas allow you to change the type of a variable, and so
on. VB Migration Partner supports over 60 different pragmas to solve most of the
challenges that you face during a complex migration project. VB Migration Partner’s
IDE even guides you through the insertion of a new pragma, using an easy-to-use
dialog box that explains the meaning of each argument. A few carefully chosen pragmas
often allow you to generate VB.NET applications with no compilation or runtime errors.
In addition to reducing compilation and runtime errors, pragmas promote the
convert-test-fix cycle, a key feature in managing complex migration initiatives.
Large real-world business applications typically require maintenance and upgrading
while the migration process proceeds in parallel. VB Migration Partner allows developers
to convert the application, test the result, and go back to the VB6 code to add
pragmas that reduce or eliminate compilation and runtime errors, and then re-try
the conversion until the VB.NET code works as intended. Developers are working with
a single source base, therefore the VB6 and the .NET versions are in sync until
new features are added to the VB.NET code.
VB Migration Partner is powerful enough to deal with huge, enterprise-level projects.
It supports batch migration processes and can easily handle applications
that are split in dozens or hundreds DLLs. It also support
source code control tools –
including Visual Source Safe and Microsoft Team System. Last but not the least, VB Migration Partner
can be fully customized by means of an extension object model that gives you full
control on the way code is generated. (For example, you decide how a given control must be translated.)
Where to go from here
If VB Migration Partner sounds the right tool for your migration needs, have
a look at the following sections on this web site for more detailed information:
- the comparison of VB Migration Partner Editions
- the online manual, with detailed descriptions
of all features, a reference guide to pragmas, etc.
- a collection of training videos that illustrate VB Migration
Partner’s main features
- the code samples section, that demonstrates
how we have used VB Migration Partner to migrate many open source VB6 applications
and book samples
- the knowledge base, a collection of short articles
that show how you can solve common issues that arise during the migration process
If you need additional support, we suggest that you
- browse our FAQ page, containing answers to many recurring
questions we’ve heard from beta testers
- subscribe to our Newsletter to get informed when
VB Migration Partner’s release version is available, to learn more migration
tips
- check out our blog to know more about the VB Migration Partner’s
internals
- for further questions, just email us
If you are new to VB6 migration issues, you might want to explore our
Articles page, with links to articles related to VB6-to-VB.NET migration,
best practice guidelines, and other code migration tools.
We plan to add more resources for VB6 developers who want to convert their applications
to the .NET Framework, including a community-driven forum.