SEB’s VB.NET Guide
Loading & RemovingForms
Using Multiple Forms
Multiple Forms
– you can use more than one form and switch between them. This hasthe effect of providing the user with multiple screens.To identify the start-up form:
•
Right-click on the project in your
Project Explorer window
•
Select Properties
•
Use the startup object drop-down box to select your start-up formTo maximise your form:
Me.WindowState = FormWindowState.Maximized
Create a new form
•
Select Properties
•
Select Add Windows Form
•
Select Windows Form (this is the default)
•
Type in a name (leave the .VB)
•
Select Open
Loading a new form
•
In the original form select the event that you want to load the new form
•
Create a variable of type ‘the new form’
Assuming you have created a new form called fNewForm you would type:
Dim frmNewForm as fNewForm
•
Create an instance of the new form
frmNewForm = New fNewForm()
Page 1 of 3
Add a Comment