When the user presses the “X” in the Main Window, I have this dialog appear:
-- Save Changes --------------------------
| |
| Do you want to save changes? |
| |
| |
| |Don't Save| |Cance| |Save| |
|__________________________________________|
I am having trouble implementing the Cancel button. I cannot figure out how to tell the Main Window not to close after the user hits Cancel. I am prompting the user with this dialog via the window’s “Closing” command/method.
In the closing event, you need to set the event property
Cancelto true.