I'm trying to include in my Windows Form App a way that when user tries to shutdown windows it opens a dialog box with CANCEL option....that office classic one.
In other topics, people describes how to prevent windows shutdown. They use a dialog box for this. It helps but if the user immediately clicks in any option in this box, windows closes the application.
You can understand what I'm meaning, doing the following test:
In windows Vista or 7 Open Paint, Word or any office soft and begin writing something. Do not save it.
Try to shutdown windows and when the classic save dialog box appears IMMEDIATELY click in "cancel".
You will see that the application continues to work and windows is asking you what you want to do.
I tried to follow this Microsoft Link but if I click "ok" in Message Box, the App closes.