Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
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?
Firefighters do it with a big hose...
  • *Experts*
Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...