|
-
Jun 28th, 2004, 10:22 AM
#1
Thread Starter
New Member
Hiding a form while another form is open
I'm fairly new to Visual Basic and have been trying to figure out how to do this.
What I want to do is when the user clicks a button on one window to pop-up another window, that first window hides as the new window pops up. Then, when the user is done with the new window, when it closes, the first window pops-back up again.
I know of the functions Hide, Show, Visible, etc
My problem is when I write my button-click event, the first window continues to execute. So even though the old window hid, it'll still continue down the execution process and become visible again despite what the new window is doing.
A hide in a while loop just merely hangs the application.
There are only 2 ways I can think of doing this, one - use threads so I can pause the first-window execution while the new window is running...or
Dump the first window all together and create a new instance of the first window in the new window -- refilling all the first window's data when I exit the new window (not going to be fun)
Is there some VB trick I'm missing that can make this easier to do?
Also, a second question. How can I make the second window have the same location on the screen that the first window had? That way the user isn't presented with window pop-ups that are in random spots on their screen.
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
|