Vb. NET programming introduction of the Five (turn)

Source: Internet
Author: User
Tags error handling time interval
Programming forms and controls
Visual Basic.NET contains a new form package: Windows Forms.
Windows Forms has the greatest compatibility with visual Basic 6.0 forms, but there are some key differences that need to be raised:
Windows Forms does not support OLE container controls; You need to be in visual
Avoid using this control in Basic 6.0 applications.
There is no shape control in Windows Forms. Rectangular and rounded shape controls are upgraded to
Label control, ellipses and circles cannot be upgraded. You need to avoid using this control in the Visual Basic 6.0 application.
There are no line controls in Windows Forms. Horizontal and vertical line controls are upgraded to
Label control, the slash bar cannot be upgraded. You need to avoid using this control in the Visual Basic 6.0 application.

Windows Forms provides new graphics commands to replace Circle, CLS, PSet, line
and point. Because the new object module is different from Visual Basic 6.0, these methods cannot be upgraded

For a timer control, setting the interval property to 0 does not stop the timer control
Run instead of setting the time interval to 1. So in Visual Basic 6.0, you need to set the Enabled property to false instead of setting the Interval property to 0来 to stop the timer from running.

Windows Forms consists of two menu controls, MainMenu (Window menu), and
Contenxtmenu (pop-up menu). Visual Basic 6 contains only one Menu control: menu. Menu can be opened either as a Window menu or as a pop-up menu. The menu will be upgraded to MainMenu after the project is upgraded. But you can't open MainMenu in a pop-up, you need to create a pop-up menu manually.

Windows Forms does not support Dynamic data exchange (DDE).
Windows Forms does not support form.printform methods

Although the Windows Forms feature supports drag-and-drop but object modules with visual
Basic 6.0 is very different, so the drag-and-drop properties and methods in Visual Basic 6.0 cannot be upgraded.

. NET schema to upgrade the Clipboard object, and to manipulate the clipping version
The Clipboard object of Visual Basic 6.0 provides more functions and support. Clipboard declaration cannot be automatically upgraded because of the different object modules


Windows Forms does not support visiting the Name property of forms and controls at run time
Ask, so you can't access the controls in the control collection through the Name property (this feature is available in the. NET System.Reflection Class)

To ensure that your form is maintained in the correct size after the upgrade, you need to make sure that in the program
Set the default scaling ratio (ScaleMode) to twips.
After the upgrade, Visual Basic.NET converts the unit of measurement from twips to pixels

The above is a description of Visual Basic.NET, from the above introduction can be seen
To, in contrast to previous versions, this time the Visual Basic can be said to be a major innovation (and there seems to be some aspects of the Delphi). It provides a previous version of the Object-oriented programming has never been, powerful error handling, with VC + + C sharp more closely integrated. But also sacrificed a lot of the original basic always have characteristics. But overall, it is worth upgrading to Visual Basic.NET.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.