Results 1 to 5 of 5

Thread: [RESOLVED] Confirm before exiting?

  1. #1

    Thread Starter
    Banned
    Join Date
    Aug 2009
    Posts
    333

    Resolved [RESOLVED] Confirm before exiting?

    How do I make it so that it will ask "Are you sure you want to exit?" when someone clicks the X?

  2. #2
    Frenzied Member toecutter's Avatar
    Join Date
    Apr 2006
    Location
    Brisbane, Australia
    Posts
    1,160

    Re: Confirm before exiting?

    Try a yes no message in the forms close event

  3. #3
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339

    Re: Confirm before exiting?

    Use the Form Closing event to pop your msgbox and you can check if the X was clicked by checking the parameter of the EventArgs. You can also use the Cancel argument to cancel the exit or not.

    Sorry didn't see your post toe.

  4. #4

    Thread Starter
    Banned
    Join Date
    Aug 2009
    Posts
    333

    Re: Confirm before exiting?

    Quote Originally Posted by toecutter View Post
    Try a yes no message in the forms close event
    What would be the code?
    EDIT: How would I use e.Cancel = True

  5. #5
    Frenzied Member toecutter's Avatar
    Join Date
    Apr 2006
    Location
    Brisbane, Australia
    Posts
    1,160

    Re: Confirm before exiting?

    Try a search, there are plenty of examples

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width