MarkD
Freshman
I have a problem displaying Form2 from within my Form1 code. According to my Visual Basic Complete .Net book (p.329 for those who have the book) I should create an instance Form2 in the event control of Form1 and then show the form (want modal in this case).
My code:
Private Sub 2ndForm_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles 2ndForm.Click
Dim Form2 As New Form()
Form2.ShowDialog(Me)
End Sub
Form2.vb exists as seen from Solution Explorer... It's populated with textbox controls.
My problem is when I execute the above code I get a small blank form instead of my Form2 with the textbox controls.
The book (and MSDN Help) both sounded pretty clear... what am I doing wrong?
My code:
Private Sub 2ndForm_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles 2ndForm.Click
Dim Form2 As New Form()
Form2.ShowDialog(Me)
End Sub
Form2.vb exists as seen from Solution Explorer... It's populated with textbox controls.
My problem is when I execute the above code I get a small blank form instead of my Form2 with the textbox controls.
The book (and MSDN Help) both sounded pretty clear... what am I doing wrong?