|
-
Jul 19th, 2004, 04:26 PM
#1
Thread Starter
Fanatic Member
Confusing DoEvents problem [RESOLVED]
Hi,
I have a program that processes something, then displays a messagebox giving the results.
Now, as soon as the user clicks the okay button on the messagebox, i want the application to end.
The way I have done that is this way:
VB Code:
MsgBox("Done", MsgBoxStyle.Information, "Complete")
Application.Exit()
However I have found that it just seems to exit the application the second it puts the messagebox up. It doesn't wait for the user to press the okay button. I think this is because of the
"Application.DoEvents()" I put at the start of the sub. The problem is tho, i need this for it to show the message box at all. I dunno why, but it's the way i've coded it - very weirdly!!!
So is there a way to make the code just wait for the user to press the okay button on the message box before it processes the application.exit() ?
Thanks very much! I've tried lots of things but nothing seems to work. I either get the messagebox to popup, but the program doesnt end when u press okay. or the current situation where it doesn't come up at all and just ends.
Last edited by LITHIA; Jul 20th, 2004 at 09:40 AM.
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
|