Quit Button

Derek.Collins

Member
Joined
Jul 31, 2012
Messages
6
Programming Experience
Beginner
I Am making a qut it button, and i'm making it have the feature to be able to select quit or go back but when i put this code in:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Hide() 'hide form2
Q2.Show()
End Sub
End Class
Then it closes the application and i'm not sure why, q2 is another windows form that i'm using. Thanks in advance!
 
I think this is because your application exists when the main form closes.
Try going to your project settings and change the shutdown mode to "When the last form closes".
I will try this once i transfer my files to my desktop also i think that will work because I had "When Startup Form Closes" Thank you ahead of time if it works :D
 
Back
Top