I've created a second form for my project.How can I show it?
I find it's different from the VB6.The form.show , visible = true ... are not working now.
How can I do this?
vbpro
0
Newbie Poster
Recommended Answers
Jump to PostPrivate Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form2.Show() 'This code call the second form to be displayed
Me.Hide() ' This code hides the first form when the second form is displayed.
End Sub
Jump to PostIf you use the Form2.Show() that the shutdown mode is set to "When last forme closes" otherwise your program will quit.
Jump to Postuse .showdialog and then it will close when the caller is closed
All 12 Replies
Mr.Stupid
0
Newbie Poster
jayateertha_23
0
Newbie Poster
Gayan Wijeratne
0
Newbie Poster
isaackhazi
0
Newbie Poster
kinyuadave
0
Newbie Poster
waynespangler
63
Posting Pro in Training
jbennet
1,618
Most Valuable Poster
Team Colleague
Featured Poster
kinyuadave
0
Newbie Poster
sumithakb
0
Newbie Poster
jbennet
1,618
Most Valuable Poster
Team Colleague
Featured Poster
elephant381
0
Newbie Poster
kvprajapati
1,826
Posting Genius
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.