Visual Basic six and Transferring to Visual Basic.NET part I
This article explains us how to upgrade our existing applications to Visual Basic.NET, different .NET variable types, and how to upgrade our existing applications to Visual Basic.NET, different .NET variable types, and her own personal programming recommendations. Some Visual Basic 6 projects and Visual Studio.NET installed on your PC to test the example code in this article.
Visual Basic.NET promotion
We can use cross language support to develop the Web and n-tier applications easily. VB.NET is now fully integrated with other Microsoft .NET languages. To provide full access to the platform and to ensure that Visual Basic moves to the Web development, it was necessary to build an altogether new platform. The Visual Basic 6 projects need to be upgraded to Visual Basic.NET to take full benefit of this.
Visual Basic .NET shifts focus from traditional development of applications to n-tier or web applications. Though VB.NET is a next version of Visual Basic, it takes quite a different approach to development of applications. Since, this was a total change of approach, rather than adding new features to the existing version, Visual Basic has been redesigned to facilitate rapid development of these applications.
Upgrading to Visual Basic.NET is not as straight forward as opening a project from Visual Basic 6 in Visual Basic.NET and running it due to its totally different nature. Though Visual Basic.NET provides a wizard for the job and it automates the task fairly well, there are quite a few things that the developer will have to look into and handle manually.
It is better to keep the some points in mind:
1. ActiveX documents are not supported in Visual Basic.NET. They should either be left in Visual Basic 6 or should be converted to User Controls.
2. It is mostly not possible to upgrade the DHTML applications and it is best to leave them in Visual Basic six.
3. Use Microsoft multi-tier architecture guidelines, create interface in ASP and develop business logic using Visual Basic.
Single Tier
Visual Basic.NET has moved away from the old extensibility model because of its language neutral approach and hence the extensibility objects will need to be changed to take full advantage of the new model. These are the applications that normally store data in let us say Microsoft Access. They will upgrade with some limitations.
Client Server
Visual Basic.NET introduces new middle-tier component, Web Services. Web Services are hosted by ASP.NET and use the http transport. This facilitates penetrating the firewalls. These services pass and return data using XML and hence the information can be used by any platform.We should keep in mind that Visual Basic.NET uses a new form package. Though largely compatible, Windows Forms has a different object model.
Statistics
Visual Basic.NET supports the ADO and Microsoft recommends using ADO for connected data requirements in place of DAO and RDO.Visual Basic.NET supports DAO and RDO in a limited sense. It does not support DAO and RDO data binding to controls, data controls or RDO User Connection.
Promotion
When the Visual Basic.NET Upgrade Wizard upgrades the code, it changes some of the data types and a few other things.
Modification
Visual Basic 6 supported variant data type, which could be assigned to any primitive data type, Empty, Error, Nothing and null but Visual Basic.NET does not support this data type. The functionality is now given to object data type.
Figure
Sixteen -bit whole numbers are called short and integers are now 32-bit numbers while longs are now 64-bit in Visual Basic.NET. While upgrading your project, the integers will be converted to short and longs to integers.
Structures
It has got new forms. Visual Basic.NET has a new Forms package and when you upgrade an existing application Visual Basic.NET automatically converts the Visual Basic 6 forms to Visual Basic.NET.