How do I make it so that it will ask "Are you sure you want to exit?" when someone clicks the X?
Printable View
How do I make it so that it will ask "Are you sure you want to exit?" when someone clicks the X?
Try a yes no message in the forms close event
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.
Try a search, there are plenty of examples