Emailid
Password
         
  
    Forgot password

New user Sign Up


Visual Basic six and Transferring to Visual Basic.NET part V

       Current Rating:  80%                                                     Total Members Rated:  1
                                                                     Send To Friend

  

Visual Basic six and Transferring to Visual Basic.NET part V

 

 

 

Control alterations

 

 

Introduction


Her we deal with the changes in control. New controls and objects in Visual Basic .NET replace the intrinsic controls, objects, and collections in Visual Basic 6.0. In some cases, the names have changed; in many cases the properties, methods, and events are different.

 



Control Array changes

 

Visual Basic.NET event handler allows an event to handle multiple controls thereby allowing the programmer to make a group of different controls that share same events. In Visual Basic 6, control arrays could be used for controls of same types. Visual Basic.NET does not support the control arrays.
Though this means that Visual Basic..NET does not support index property, it can be easily simulated using Tag property of the control if the need be.



Dialog Boxes

 


Instead of a CommonDialogControl like Visual Basic 6, Visual Basic.NET sports different pre defined dialog controls To show the forms modally, Visual Basic.NET uses ShowModal method.

 

MDI Changes


MDI form has to be added to the project and other forms' MDIChild property needs to be set to true in Visual Basic six. In Visual Basic.NET, any form can be made an MDI parent by IsMDIContainer property to true.



Menu Changes


The menus are designed using MainMenu control and context menus are designed using ContextMenu control in Visual Basic.NET.




General modifications

 

There is no line control in Visual Basic .NET. Horizontal and vertical lines are upgraded to labels. Diagonal lines are not upgraded, and you should avoid using them.

 

 

Visual Basic.NET does not support DDE

 

Visual Basic .NET does not support the OLE container control; you should avoid using this control in your Visual Basic 6.0 applications.

There is no shape control in Visual Basic .NET. Square and rectangular shapes will be upgraded to labels, while ovals and circles cannot be upgraded. You should avoid using these in your applications.

Windows Forms support only true-type and open-type fonts. Other fonts than these, if used in the applications will be changed to default font MS Sans Serif

To ensure that the form upgrades to right size, default ScaleMode twips should be used.

Visual Basic .NET has a new set of graphics commands that replace the Form methods Circle, CLS, PSet, Line, and Point. Because the new object model is quite different from Visual Basic 6.0, these methods cannot be upgraded.

For the Timer control, setting the Interval property to 0 does not disable the timer; instead the interval is reset to 1. In your Visual Basic 6.0 projects, you should set Enabled to False instead of setting the Interval to 0.

Visual Basic.NET does not support Form.PrintForm method

 

Conclusion



Visual Basic.NET is a totally different platform and upgrading the applications from Visual Basic 6 need to be done carefully. Most of the automatic change is handled well by the Upgrade Wizard. Yet, many a times you will have to make manual changes to the code. It is wiser to anticipate the problems that will be faced by the Upgrade Wizard. So that appropriate changes can be incorporated in the application to be upgraded.

Following steps will summarize the steps required for upgrading a Visual Basic 6 project to Visual Basic.NET:

 

1. Make the changes wherever required.

 

2. Read and understand the Upgrade report created by the Wizard.

 

3. Upgrade Wizard is called automatically.

 

4. Prepare your application for Upgrading.

 

5. Learn .NET framework and Visual Basic.NET.

 

6. It upgrades the application and creates an Upgrade Report alerting you to the errors and warnings.

 

Have a nice time!


                           Rate This Article:   

Author is Offline
  Author: Pamela Teipel
       


Comments Posted
Label
Subject Author Status Date

 

Post Comment

Related Articles
Software Development Outsourcing (Offshore ) to India
Make your web site ‘perfect and Search Engine Friendly for Google and Yahoo
Attract your Web site visitors!
Improve your Website Performance
How to improve your content



Home | About Us | Site Map | Privacy Policy