Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing Forms with a button

Status
Not open for further replies.

cmccalli

MIS
Sep 30, 2003
1
US
I have a button on form1 and when I click on it I want to open form2. What is the code for that.
 
Code:
Private Sub Button1_Click(.....) Handles Button1.Click
  dim objForm2 as new Form2()
  objForm2.Show()
End Sub
[code]

you can also use
[code]
objForm2.ShowDialog
[code]
if you want form2 to be displayed as a modal dialog window.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top