be58d2003 Posted March 5, 2004 Posted March 5, 2004 I have an exit function on my MainMenu, when I click on it... a message box pops up to confirm whether or not the user really wants to exit. I have given them the options of Yes or No and it works great, the program responds how I want it to. But I also want this message box to pop up when the user clicks on the "X" in the upper right corner of the form. I can get the message box to display, however... regardless whether the user clicks Yes or No, the program still terminates, anyway to fix this? Quote Firefighters do it with a big hose...
*Experts* mutant Posted March 5, 2004 *Experts* Posted March 5, 2004 Use the closing event of the form. The arguments passed into the event will enable you to stop the form from closing. e.Cancel = True This will cancel the closing of the form. Quote
be58d2003 Posted March 5, 2004 Author Posted March 5, 2004 Thanks, I will give that try. Quote Firefighters do it with a big hose...
be58d2003 Posted March 5, 2004 Author Posted March 5, 2004 GREAT! It worked, thanks for the help. Maybe you could help with my other question that I posted, a couple of days ago...http://www.xtremedotnettalk.com/showthread.php?t=83594 Quote Firefighters do it with a big hose...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.