actually what do you want to do?
you can show the form as ShowDialog() on the button click event to show the form as modal dialog.
show() to simply show the form
Private Sub btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn.Click dim frm as New Form1()frm.Show()
end sub
Private Sub btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn.Click
dim frm as new Form2()
frm.Show()
end sub
as suggested that would be the correct way of doing so. Adapting to your solution, double click the button then type this:
Dim theForm as new Form2()
theForm.Show() 'Or ShowDialog() depending on how you wish to show your form
dim frm as new Form2()
frm.Show()
End Sub
it the name of your button is btn if no then.
change the code as fallows
Private Sub btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles <your button name>.Click dim frm as new Form2() frm.Show() End Sub
it will better you double click on the button in the desing form and on the code put the two line to show the form in side the click event.
dim frm as new Form2() frm.Show()