MessageBox doesn't vanish even code reaches to end of function...

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Arif (Arif_at_discussions.microsoft.com)
Date: 02/19/05


Date: Sat, 19 Feb 2005 07:53:02 -0800

Hi,

I am using MessageBox.Show() to get user Yes/No actionl. But problem is that
after clicking Yes or No, the Message Box desn't vanish suddenly, even code
reaches to the end of function. However after exiting the function, the
Message Box vanishes.
This looks bad to user.

Also, I do some long operation inside a loop and wants to exit the loop when
user click on a button. Problem is the any control e.g. Buttons don't work
until the control reaches to the end of function causing function end.

Please help me knowing
1- how to vanish this MessageBox suddenly after getting click on Yes/No
buttons,
2- how the button_click() can be executed during an operation (Note: The
button works after exiting the function, but due to this i m unable to write
code that terminates a loop on a button click) .

Arif.


Quantcast