Question New-comer from VB6, some easy questions

J Trahair

Well-known member
Joined
May 14, 2008
Messages
175
Location
Spain
Programming Experience
10+
Hi everyone. I am 'between projects' and have decided to look at VB.net.
Is there a resource for experienced VB6 programmers who need to know simple stuff, eg. how to load a form using inherits system.windows, how to unload forms and end application, how to position a small form centrally, how to....OK, that'll do for today.
Thanks in advance.
 
You can inherit forms just like you inherit any other inheritable class (Textbox, Label, etc...)

When you create a new form, switch to code view and change the 'Inherits' line from System.Windows.Forms.Form to your form.

To unload a .net form, simply call it's .Close() method. If you do it from the form itself it's as simple as Me.Close()

Typically your application will close automatically when the startup form is closed or when the last open form is closed. If you're using Sub Main() as the start point, all you need to do is let Sub Main hit the 'End Sub' line and the app closes.
 
Back
Top