What are the pros and cons of an automatic translation tool vs. manually rewriting the application from scratch?
The decision of using a code translator vs. rewriting the application from scratch should be based mainly on the balance of benefits and costs. If you have unlimited time, skill, and money, the re-writing approach is undeniably the way to go. In most real-world scenarios, however, you need to go to the market as soon as possible, have money constraints, and maybe don’t have a team of experienced .NET developers.
Another factor to consider is whether the original VB6 application must continue to evolve during the migration process, as it is often the case with business applications that are continuously updated to comply with customers’ requests, new laws, etc. In such scenarios, keeping the migration time as short as possible becomes a crucial factor.
What is VB Migration Partner?
VB Migration Partner is an innovative tool that converts VB6 applications to VB.NET and C#. It has been designed from the ground up using advanced parsing algorithms and dramatically reduces the overall time and cost of the migration process.
Code Architects launched VB Migration Partner in 2008. It was a five-year effort by a team of top-notch developers led by Francesco Balena, renowned speaker and author of seven books for Microsoft Press, including Programming Microsoft Visual Basic 6 and other books of the Programming Microsoft Visual Basic series down to Programming Microsoft Visual Basic 2005. Read more about Code Architects and the VB Migration Partner Team here.
How can VB Migration Partner reach such a high success ratio?
Three main factors contribute to VB Migration Partner’s superior performance. First, unlike other tools based on generic conversion engines, we designed VB Migration Partner’s conversion engine from scratch with the only purpose of understanding and converting VB6 applications. Second, VB Migration Partner comes with a comprehensive support library that virtually eliminates the differences between the two languages. For example, VB Migration Partner can convert VB6 applications that use graphic statements, custom coordinate systems, drag-and-drop, Windows subclassing, DAO, RDO, and ADO data binding, DDE (Dynamic Data Exchange), and a lot more. Third, VB Migration Partner can be enhanced by means of the so-called migration pragmas.
What are migration pragmas?
Migration pragmas are special remarks that developers can insert in the original VB6 code to drive the migration process and generate better .NET code. For example, pragmas can indicate how arrays and auto-instancing variables are translated, whether an object requires deterministic finalization, or if support for default properties in late-bound mode is necessary. Pragmas can optimize the resulting application and control what warnings VB Migration Partner should emit, among many other things.
You can define pragmas at the solution, project, file, method, and individual variable level – a huge advantage over conversion tools that only offer project-level settings. For example, you can have a group of project-level pragmas that establish general conversion rules, plus a few other pragmas that handle exceptions to these rules inside specific forms, classes or methods.
Can VB Migration Partner manage large VB6 business applications?
In over one dozen years since its inception, VB Migration Partner has converted thousands of VB6 projects, including monster applications with over 6 million lines of code. It offers features aimed at handling very large applications, in ways that no other conversion tool can.
VB Migration Partner lets you do your chores in less time simply because it is fast, up to 8 times faster than its competitors while delivering better code than they do.
VB Migration Partner even allows you to migrate only a subset of all the forms, classes and modules in theVB6 project. This way you can focus your attention on a form or a class at a time, and don’t have to worry with the hundred compilation errors caused by all the other files in the VB6 project. No other VB6 converter offers anything similar.
I need to extend and improve the VB6 application while the migration process proceeds. Can VB Migration Partner handle such a requirement?
Migration tools from other vendors force you to work on a “snapshot” of the original VB6 application; if you later extend or modify the VB6 code, the converted .NET application does not include these fixes and enhancements. Consequently, if the migration process takes weeks or months – a reasonable assumption for real world business applications –the .NET application is already outdated by the time it finally compiles and runs correctly. VB Migration Partner copes with this issue by introducing the concept of convert-test-fix cycle.
What is the convert-test-fix cycle?
Typically, migrating a real-world VB6 application with VB Migration Partner is an iterative process that goes through the following three stages. First, you convert the original VB6 code and test the result; odds are that the converted .NET project contains invalid code that causes compilation errors, thus you have to fix the original code to avoid these errors. Instead of modifying the VB6 application or the converted .NET application, VB Migration Partner allows you to apply these fixes by inserting pragmas in the VB6 code. You can then re-submit the new, “pragma-enhanced” VB6 project to VB Migration Partner, see the results, and add more pragmas if necessary, and continue this process until no more compilation errors occur.
When the converted .NET project compiles correctly you are now at about the middle of the migration process, because you can now actually run the .NET project and see how it behaves. Again, odds are that you will experience runtime exceptions or other sorts of malfunctioning. You take note of these problems, understand how to avoid them – our Knowledge Base is the best source of information for this purpose – and fix the original VB6 code by adding more pragmas. Next, you convert the VB6 code again, test the result, and fix the original code with more pragmas until the code both compiles and executes correctly.
It is essential to notice that during all the iterations of the convert-test-fix cycle the original VB6 code is modified only by inserting pragmas, which are remarks and therefore don’t affect how the code behaves. All the features and bug fixes added to the original code in the time window necessary to complete the migration process are converted to .NET as expected. Only a migration tool that supports pragmas (or an equivalent mechanism) can guarantee that the converted application is always in-synch with the original VB6 code.
What is the Trace-Match methodology?
When migrating from VB6 it is essential to ascertain that the generated code preserves full functional equivalence with the original application. However, “proving” that such equivalence is preserved is easier said than done. In many cases, just comparing the result on the user interface or the data stored in the database isn’t enough, because you are seeing the final effects, not all the intermediate steps. It is hard to reach the certainty that the converted code will behave like the original VB6 code in all circumstances.
Trace-Match methodology is a VB Migration Partner feature that can help you in determining that the VB6 and the .NET code work exactly in the same way, create objects and invoke methods in the same order, assign the same values to variables, and so on.
From a technical perspective, Trace-Match is the combination of a VB6 tracing library, a .NET tracing library, and the ability to automatically insert (and remove) thousands trace statements by means of a simple click. Once all the trace statements are in place, you just need to perform a set of test cases on both the VB6 app and the converted .NET app, and check that the produced trace files are identical (or at least, very similar).
Trace Match also comes with basic profiling features, thus it’s easier to immediately detect when the original or the converted application spend most of their time. Trace output can go to a file or be displayed by means of utilities such as DebugView.
What are extenders?
VB Migration Partner’s open architecture supports plug-ins (or extenders) that can participate and alter the migration process. An extender is a class that implements a special interface that VB Migration Partner recognizes and uses to communicate with the extender. The class must be compiled in a DLL and deployed in VB Migration Partner’s main directory.
Right out of the box, we provide a few extenders that eliminate unused constant and Declare statements and that refine the code produced by the conversion of UserControl classes. You can enable or disable individual extenders from the Extenders tab of the Options dialog box. These extenders are provided also in source code format and can be the basis for your own plug-ins.
Our VB6 application doesn’t clearly separate the user interface, the business logic layer, and the data layer. Can your tool help in this respect?
An automatic translator cannot do much to change the overall architecture. You can solve this issue only by rewriting the application. Strictly speaking, it isn’t a “porting” any longer and isn’t a “re-writing from scratch” either, because existing users expect that the new application behaves as closely as possible to the original one and you can’t completely change the way they interact with the user interface.
What kind of support do you provide?
The first source for technical support is VB Migration Partner’s manual and the extensive knowledge base. We put a tremendous effort in creating hundreds pages of detailed information and code examples, and make it fully searchable. If you see a migration warning or a runtime exception, just search for the error message: in most cases, you will get an immediate solution for your problem. VB Migration Partner has users in all five continents and all time zones, and we don’t want to keep them waiting until we open our offices. (BTW, we live in Southern Italy, and welcome customers who pass by and visit us.)
If the online documentation and examples aren’t enough, we provide technical support via email. Typically we prefer email support rather than phone calls or remote assistance, primarily because we might need to pass your code samples through our conversion engine, debug the result, etc. This is better done offline.
Do you provide turn-key migration services?
Yes, we do. We have converted VB6 projects of any size, up to 3 million lines of code, for companies in US and Europe. Read here for more information.
What Visual Basic versions can VB Migration Partner handle?
VB Migration Partner converts applications written in VB6. If you have an application authored in VB5 or earlier version, you must convert it to VB6, ensure that it compiles and works correctly, and finally convert it to .NET using our software.
VB Migration Partner does not convert other Visual Basic “dialects”, such as VBA and VBScript. Active Server Pages (ASP) applications are not supported either, because they use VBScript.
What Visual Basic versions can VB Migration Partner handle?
VB Migration Partner converts applications written in VB6. If you have an application authored in VB5 or earlier version, you must convert it to VB6, ensure that it compiles and works correctly, and finally convert it to .NET using our software.
VB Migration Partner does not convert other Visual Basic “dialects”, such as VBA and VBScript. Active Server Pages (ASP) applications are not supported either, because they use VBScript.
Do I need to run VB Migration Partner on a computer where Visual Basic 6 is installed?
Yes, for several reasons. First, the ability to edit and re-compile the VB6 application while fixing some recurring migration issues makes the migration process easier and speedier. Second, this arrangement ensures that all file paths and registry entries are correct, that the right version of all type libraries is found, and so forth. Third, during the conversion process VB Migration Partner uses components written in VB6, therefore it is required that the VB6 runtime be installed on the computer where you install VB Migration Partner. If this requirement isn’t met, the setup process might fail.
Do I need to run VB Migration Partner on a computer where Visual Studio .NET is installed?
Yes, because VB Migration Partner uses a few utilities that come with Microsoft Visual Studio, therefore we consider Visual Studio as a prerequisite for successfully carrying out the migration process.
Which VB6 controls does VB Migration Partner convert?
All the 60+ controls that come in the Visual Basic 6 package, with only two exceptions: the OLE and the Repeater control. The so-called “windowless” controls (e.g. WLText and WLCommand) are also converted correctly, as are some controls and type libraries that aren’t shipped with Visual Basic 6 but are often used by VB6 developers, such as the WebBrowser, ScriptControl, the Scripting library, and the VBScript Regex engine. VB Migration Partner even supports a few controls from third-party vendors, such as the Active ThreeD Plus suite from Sheridan (now Infragistics).
Unlike other conversion tools, all major features of that control are correctly converted and behave as expected in the .NET application. For example, by claiming that VB Migration Partner supports the PictureBox control we mean that it supports all its graphic methods, all drag-and-drop events (in both “classic” VB3-style and OLE flavors), data-binding, DDE, the ability to work as a container for other controls, and a lot more. No other conversion tool on the market supports all these features.
Which VB6 features are not supported?
VB Migration Partner does not support WebClass components, DHTML Page classes, DataReport controls, and the Microsoft Forms library. UserDocument and PropertyPage classes aren’t supported directly: they are converted to .NET UserControls, therefore developers can easily reuse them in a different context.
Do converted .NET applications depend on COM and ActiveX components?
The majority of controls used by migrated applications are fully .NET controls and do not depend on any ActiveX control or COM-based technology. The only controls that depend on the original ActiveX control are DataGrid, MSHFlexGrid, MS Char, MM Control, MSComm, INet, MAPISession, MAPIMessage, Winsock, and ScriptControl.
Are converted applications “true” .NET Framework executables?
Yes, absolutely. VB Migration Partner generates native .NET applications that can be loaded inside Microsoft Visual Studio and modified or extended as needed. You can add new forms, add standard .NET controls to form migrated from VB6, use any class in the .NET Framework, and so forth.
Do converted .NET applications require a support library?
Applications generated by VB Migration Partner require that the CodeArchitects.VBLibrary.dll file be deployed with the .NET executable. The library is essential to support features that have no counterpart in .NET – DataEnvironment classes, for example – or that are implemented in a completely different way (graphic methods or data binding, just to name a few).
It is worth nothing that other conversion tools also depend on a support library, even though it is not as extensive and powerful as VB Migration Partner’s.
Do converted .NET applications depend on Visual Basic 6 runtime?
No, converted .NET applications have no dependency on Visual Basic 6 and its runtime.
Can VB Migration Partner convert 3rd-party ActiveX controls?
Yes, it can. We provide a tool named AxWrapperGen, which you can use to create wrapper classes for ActiveX controls that VB Migration Partner does not support out of the box. You can fine-tune, modify, and extend these classes – if necessary – and control how properties of the original ActiveX controls are translated. You then compile the wrapper classes into a DLL and drop it in a directory where VB Migration Partner can find it, so that the next time you run the tool it will recognize the additional controls. An individual DLL can provide support for multiple ActiveX controls.
We have prepared two whitepapers on this topic: A smart approach to 3rs-party ActiveX control conversion explains the basics of AxWrapperGen, whereas ActiveX controls and wrapper classes is a step-by-step tutorial that guides you through the conversion of a control.
What about ActiveX controls authored in VB6?
VB Migration Partner can convert UserControls authored in VB6. All basic features and most advanced ones are supported, including the Extender object, Ambient properties, graphic methods, and more. VB Migration Partner generates XML comments and Description attributes for properties and supports UserControls that work as data sources (for example, a custom Data control). Our knowledge base includes a few tips for improving converted UserControl and we provide an extender DLL that generates a more “polished” code for these components.
Can VB Migration Partner generate ASP.NET applications?
Unfortunately, no. The ASP.NET programming model is too different from VB6 model for an automated conversion tool to achieve a significant success ratio. In our opinion, all existing tools that claim to offer such a feature don’t generate .NET code that meets the quality standards that are required for real-world software, in terms of efficiency and maintainability.
Do I need administrative privileges to run VB Migration Partner?
VB Migration Partner requires access to areas of the registry and the file system – most notably, the System32 directory where most ActiveX controls are installed – therefore it is required that it runs under administrative privileges and – if running under older version of Windows – that User Access Control (UAC) be disabled.
Can VB Migration Partner convert MTS/COM+ applications?
VB Migration Partner converts MTS/COM+ components written in VB6 into .NET classes that inherit from System.EnterpriseServices.ServicedComponents, and decorate them with the proper Transition attribute. Calls to the most important and widely used objects in the COMSVCSLib type library – namely ContextInfo, ObjectContext, SecurityProperty – are converted into calls to .NET methods. If a VB6 app uses only these objects, then the reference to COMSVCSLib typelib is dropped and the .NET project has no direct dependency on it; else, this typelib will be referenced also by the converted .NET application.
Additionally, VB Migration Partner recognizes the IObjectConstruct interface and generates the correct code that allows an MTS/COM+ component to retrieve the construction string passed to it by the COM+ infrastructure.
How much does VB Migration Partner cost?
The price of VB Migration Partner depends on a number of factors, including the total size of the applications to be migrated and the number of user licenses
Please download our free VB6 Bulk Analyzer tool, run it over your VB6 source code, and send us the generated report. VB6 Bulk Analyzer can process all the files in one or more directory trees, therefore you can create a single report for all the VB6 projects that make up your application. In return, you will receive a price quotation, a summary of all the challenges might face in your migration process, which ones can be easily solved by VB Migration Partner, and which ones might require some additional work.
What are the terms of the end user license agreement (EULA)?
Not counting the usual legal stuff, by purchasing our software, basically you agree on the following terms: You can’t convert someone else’s VB6 projects, unless they also own a copy of VB Migration Partner.
To clarify: VB Migration Partner consists of two distinct pieces, the actual converter and the support library. If you own an application that has been converted from VB6 using our tool (and therefore requires the support library) then you must purchase a VB Migration Partner’s license, even if the actual conversion job was done by an external consultant or a 3rd-party company. This restriction holds true regardless of whether you have converted the VB6 project for internal use or if you are reselling it to end users.
You can download the complete EULA from this page.
Is the support library's source code available?
Yes, we can provide a quotation for the support library’s source code.
Please notice, however, that the support library is provided as compiled, optimized VB.NET code and there is no technical reason for purchasing the support library’s source code. From a conceptual point of view, the support library works like the .NET Framework: you can extend it by inheriting from its classes or by adding new classes, but you never need to modify its source code. Moreover, even a minor change in the library’s code might introduce subtle bugs and we would be unable to support you if you modify the library in any way.
Is it possible to get a demo/trial version?
Yes, you can have a working, time-limited Trial Edition of VB Migration Partner that allows you to test it against your actual code. Contact us to receive the personalized link to download it.
What do I have to do to get your free advice for a successful migration?
To get our free advice and learn more about your VB6 applications, run VB6 Analyzer on your source code and send us the generated text file. You will receive a detailed report, prepared by our team of VB6 and .NET skilled developers led by VB guru Francesco Balena, about your VB6 applications and how VB Migration Partner can help you to quickly and effectively migrate it to .NET.
Is technical support included in the license price?
VB Migration Partner’s license comes with a 6 month subscription period, during which you can submit any technical question related to our software and you will be able to download any new version of VB Migration Partner, including any other ancillary component we have uploaded to our web site in the meantime.
You can extend the subscription period if necessary. Please contact us for details.
We provide migration services to 3rd-party companies. Can we later transfer the license to our customers?
If you are an independent consultant or a company that provides migration services, you need to purchase a VB Migration Partner license to do the migration. However, once the migration is over you can transfer your license to your customer, free of change. It is only necessary that you inform us, so that we can deactivate your license and activate theirs.
What kind of guarantee do you offer that VB Migration Partner can correctly convert my VB6 application to .NET?
Unfortunately, no code conversion software – regardless of its source and target language – can be proved to work flawlessly in all circumstances. Please consider that other VB6-to-.NET tools on the market don’t even attempt to convert features that VB Migration Partner fully supports, for example graphic statements, drag-and-drop, and DDE. Your VB6 application may include portions that do not work well after the migration to .NET, for a variety of reasons.
A quick way to understand whether VB Migration Partner supports a given feature or control is browsing and searching our massive online documentation. We put together a detailed manual and a huge collection of Knowledge Base articles that describe what VB Migration Partner supports, and what it does not.
There is a simple way to check whether VB Migration Partner can fulfil your needs: just ask for a Trial Edition and see for yourself. VB Migration Partner Trial Edition has no limitations in the size of VB6 projects it can convert and includes virtually all the features of the Full edition. The Trial Edition has an expiration date, yet you have enough time to test it against the most challenging portions of your code. Best of all, as a Trial Edition user you have full access to tech support, thus you can also test the quality of the team of developers behind VB Migration Partner.
Do you charge a fee for your support library?
VB Migration Partner’s support library is royalty free and it will always be, period. You can distribute it together with the converted VB.NET or C# application, with no restriction whatsoever.
In addition to being fully royalty-free, registered VB Migration Partner’s user have the lifetime right to download any future release of the library. Such future releases might include bug fixes, performance optimizations, and other minor features.
Moreover, if – many years from now – Code Architect ever decides to discontinue VB Migration Partner, all registered users will receive the full source code of the library. For free.
What VB.NET, C# and Visual Studio versions does VB Migration Partner generate code for?
VB Migration Partner generates VB.NET and C# projects and solutions that are compatible with any version of Visual Studio starting with VS2010 and up to VS2019, meaning that all these projects can be loaded in any new version of Visual Studio. VB Migration Partner can also directly launch Visual Studio up to version VS2015, but lack of support for launching newer versions shouldn’t be considered a limitation, because this feature is never useful in everyday work.
As a matter of fact, here is the most efficient and productive approach for repeatedly migrate VB6 projects, regardless of what is your target VS version:
- Perform you first migration and save the VB.NET or C# files in a dedicated folder on your hard disk.
- Launch Visual Studio from the Start menu (not from inside VB Migration Partner!) and load the migrated VB.NET or C# solution
Depending on the actual version, you might confirm that you want to upgrade your files from an older format. - …. do whatever you need to do inside visual studio, then ….
- go back to VB6 editor, modify the VB6 code or insert pragmas, and save the modified VB6 code to file
- use the Reload command from inside VB Migration Partner to load the new code, migrate it and save it again in the same folder selected in step 1
- Switch to Visual Studio, that in the meantime detected that old files were overwritten and displayed a dialog box asking whether you want to discard any changes, and click YES
- … go back to step 3