-
Closing a form
This one should be simple. All I want to do is click a button to go to a new form and at the same time close the current form.
As of now, when I click to go to the new form, the old one is still in the background. When I click on the go back button of my second form, it opens a new instance of the first form, thus causing me to have two of the same form1 open.
Thanks.
-
Use Me.Close() method to close the current form .
-
didn't work
The problem with me.close is that it closes the entire application...
-
A somewhat sloppy way do handle this would be to pass form1 to form2, and then call form1.Close() in form2's New constructor.
I am sure there are better ways to handle it, such as MDI, but this might fit your needs.
-
Me.Close() method closes the application if you use it with the startup form , otherwise I've just tested it , it's working fine . The suggestion VBCrazyCoder mentioned sounds cool though .
-
Why don't you look into Form.Hide and Form.Show?