|
-
Apr 30th, 2003, 01:25 PM
#1
Thread Starter
New Member
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.
-
Apr 30th, 2003, 01:45 PM
#2
Sleep mode
Use Me.Close() method to close the current form .
-
Apr 30th, 2003, 01:49 PM
#3
Thread Starter
New Member
didn't work
The problem with me.close is that it closes the entire application...
-
Apr 30th, 2003, 01:52 PM
#4
Fanatic Member
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.
-
Apr 30th, 2003, 01:57 PM
#5
Sleep mode
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 .
-
May 1st, 2003, 01:58 AM
#6
Fanatic Member
Why don't you look into Form.Hide and Form.Show?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|