Wednesday, January 21, 2009

Upgrading Applications Created in Visual Basic 6.0

Visual Basic 2008 provides the ability to upgrade applications created in Visual Basic 6.0 so that you can continue development, taking advantage of the benefits of the .NET Framework. When you first open a Visual Basic 6.0 project file (.vbp), the Upgrade Wizard appears. A command-line tool is also provided for upgrading projects outside the development environment.
With Visual Basic 2008, you can upgrade applications created in Visual Basic 6.0 so that you can continue development, taking advantage of the benefits of the .NET Framework. When you first open a Visual Basic 6.0 project file (.vbp), the Upgrade Wizard appears. You can also upgrade projects outside the development environment with the provided command-line tool.
The upgrading tools modify code in your project to comply with Visual Basic 2008 syntax and replace any forms and controls with Visual Basic 2008 equivalents. Because of the differences between Visual Basic 6.0 and Visual Basic 2008, some parts of your project may not upgrade correctly. In these cases, you receive an upgrade report to guide you through the process of modifying the application.

If you are not ready to upgrade your Visual Basic 6.0 application, you can still take advantage of the benefits of the .NET Framework by using Interop Forms Toolkit 2.0. Interop Forms Toolkit 2.0 enables you to create new forms or UserControls in Visual Basic 2008 and use them in your Visual Basic 6.0 application.
Interop Toolkit 2.0 can be downloaded for free from the page on the MSDN Web site

Some Visual Basic 6.0 applications may not benefit from being upgraded to Visual Basic 2008. You can prepare those applications that you do choose to upgrade so that upgrading occurs with little difficulty.
The following topics will help you better understand the upgrade process.
Why Upgrading Is Necessary :
For example, many of the new features found in Windows Forms (the new forms package) could have been added to the existing code base as new controls or more properties. However, had this been done, developers would not get the benefits of all the other great features inherent to Windows Forms, such as security and visual inheritance.
One of the major goals of Visual Basic 2008 was to ensure that Visual Basic code could fully interoperate with code written in other languages, such as C# or C++. Another goal was to enable Visual Basic developers to harness the power of the .NET Framework simply, without resorting to the programming workarounds traditionally required to make Windows APIs work. Visual Basic now has the same variable types, arrays, user-defined types, classes, and interfaces as Visual C++ and any other language that targets the common language runtime; however, some features such as fixed-length strings had to be removed from the language.
Visual Basic is now a true object-oriented language; some unintuitive and inconsistent features like GoSub/Return and DefInt have been removed from the language.
The result is a re-energized Visual Basic, which will continue to be the most productive tool for creating Windows-based applications and is now positioned to be the best tool for creating the next-generation Web sites. The tradeoff is that Visual Basic 6.0 applications must be upgraded to conform to the new language and forms features, breaking compatibility with earlier versions.


Exploring Sources Code © 2008 Template by Dicas Blogger.

TOPO