How can I change the behavior of the "Close" button in a form?
-
How to implement the following function: If click the close button of a window, there will be a messagebox with two selections "YES" and "NO". If "YES" is selected, the window is closed as usual. If "NO" is selected, the application will return to the preivous window. Thanks.
-
How to implement the following function: If click the close button of a window, there will be a messagebox with two selections "YES" and "NO". If "YES" is selected, the window is closed as usual. If "NO" is selected, the application will return to the preivous window. Thanks.
find the forms OnClosing event, and show a message box from there, if they press yes, just continue and if they press No, you can set e.cancel = True which will stop the form closing. hope this helps - Andy http://www.guardian.co.nr
-
find the forms OnClosing event, and show a message box from there, if they press yes, just continue and if they press No, you can set e.cancel = True which will stop the form closing. hope this helps - Andy http://www.guardian.co.nr
-
Glad to be of help :) http://www.guardian.co.nr