There are many reasons why you might want to have multiple forms in your applications. 

When using multiple forms you set the startup form to load when your project starts (In Project > Properties), then attach code such as Form1.show, Form1.Hide, Form2.Show etc to make forms appear and hide.

One nice enhancement you can add using multiple forms is to provide a full screen backdrop of your choice.  This makes your project look cleaner and more attractive when running.

This can be achieved by adding another form:  Choose Project > Add form from the menu.

Set these properties:  Form 2 BackColor property to a colour of your choice, Borderstyle to 0 - None, and WindowState to 2 - maximised.  Then add this code to Form2

Private Sub Form_Activate()
    Form1.Show
End Sub

Form 2 then needs to be set as the startup form.  From the menus choose Project > Properties.  Select the Startup object to be Form2

Set the ControlBox property of Form1 to False

Make sure that your project has a working Exit button, otherwise you will not be able to get out of your program except by using CTRL-ALT-DEL

You will also need to add code to your exit button to Unload Form2 as well as Form1 on exit.  (Alternatively you can use an end statement)

 


Add a new startup form to a project you completed earlier.  On the first form find out the user's name, then include the name in one of the labels on the main form.  For example Form1 might have an input box asking for the user's name.  Store it in a variable userName (declared in General Declarations), then use it in a label on Form2:  "Hello Kylie, click on the die to roll."