Question How to load a second form in vb2008 express

prowiec

New member
Joined
May 6, 2010
Messages
1
Programming Experience
Beginner
Hey, I have a perhaps simple problem but cannot deal with it.
What would be the code for loading another form.
let me explain in more details...
im writing a very simple game for my project and want to load another form when "level" on my first form finishes
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim LevelTwo As level2
If picSpaceship1.Visible = False And picSpaceship2.Visible = False Then
MsgBox("Congratulations, next level") and 'here is the code im missing

End If

would appreciate it if someone got to me quick
thank you
 
Making a new instance and then showing is the easy part....

VB.NET:
'Instantiates the variable frmNextLevel as an instance of form frmSecondLevel
Dim frmNextLevel as New frmSecondLevel

'Then to show the new form
frmNextLevel.Show()

Getting it to mesh in with what you want it to do and look like that's the hard part. :)
 
Back
Top