Home arrow VB.Net arrow Page 6 - Migrating to Visual Basic.NET from Visual Basic 6
VB.NET

Migrating to Visual Basic.NET from Visual Basic 6


Those already familiar with Visual Basic shouldn't have to worry about migrating to Visual Basic.NET. In this article Vaijayantee shows us how to upgrade our existing applications to Visual Basic.NET, different .NET variable types, and her own personal programming recommendations. After reading this article you'll be able to migrate from VB6 to VB.NET in no time!

Author Info:
By: Vaijayantee Sateesh Kamat
Rating: 4 stars4 stars4 stars4 stars4 stars / 47
April 08, 2002
TABLE OF CONTENTS:
  1. · Migrating to Visual Basic.NET from Visual Basic 6
  2. · Upgrading to Visual Basic.NET
  3. · Upgrade Report and Comments
  4. · Upgrade Report
  5. · Programming Recommendations
  6. · Control Changes in Visual Basic .NET
  7. · Summary

print this article
SEARCH DEVARTICLES

Migrating to Visual Basic.NET from Visual Basic 6 - Control Changes in Visual Basic .NET
(Page 6 of 7 )

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 in Visual Basic .NET

In Visual Basic 6, control arrays could be used for controls of same types. Visual Basic.NET does not support the control arrays.. 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.

For example, one single event handler could be written for Click event of a Button control or a CheckBox control in Visual Basic.NET, by specifying names of the controls in the “Handles “ clause of the event handler.

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.

Menu Changes in Visual Basic.NET

In Visual Basic.NET, the menus are designed using MainMenu control and context menus are designed using ContextMenu control.

MDI Changes in Visual Basic.NET

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

Dialog Boxes in Visual Basic.NET

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.

General changes in Visual Basic.NET
  • 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.
  • 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 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 DDE
  • Visual Basic.NET does not support Form.PrintForm method
  • To ensure that the form upgrades to right size, default ScaleMode twips should be used.
  • 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

blog comments powered by Disqus
VB.NET ARTICLES

- MyClass - Implementing Polymorphism in VB.Net
- Building a News Ticker Using VB.Net
- Everything You Wanted to Know About Forms In...
- Building Assemblies with VB.Net
- Simple VB.NET Notify Icon with Panel Applica...
- Regular Expressions in .NET
- String Encryption With Visual Basic .NET
- Deploying Applications in VB.NET: Part 1/2
- Watching Folder Activity in VB.NET
- Creating A Windows Service in VB.NET
- Implementing The Google Web Service In VB.NET
- Migrating to Visual Basic.NET from Visual Ba...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials