.NET - How to add a new Windows Form |
Visual Basic 6 and .NET handle forms somewhat differently. To add a new Windows form to an existing project:
STEP 1. From Visual.NET dropdown: PROJECT -> Add new Item (shortcut: CTRL + SHIFT + A)
STEP 2. Select Windows Form and choose a name for the form class like frmAbout for say an About dialogue box
STEP 3. Where you want to show the new fom add the following code:
Dim frmAbout as New frmAbout
STEP 4. To display the form use one of the following:
To allow the user to navigate on other windows use Show
frmAbout.Show()
To force the user to respond to the form use
ShowDialog
frmAbout.ShowDialog()
~~~~~~~~~~
Reference:
page 140-142 - Visual Basic for Windows.NET by Harold Davis
Did this post make you go hmm?



