I am developing windows Forms application, for this i am using SmartClient. Here i click workspace close('X') event at the time i want to display messageBox based on user input (OK/Cancel) i have to decide pane has to be close or not.
Asked
Active
Viewed 250 times
2 Answers
0
Use the ParentForm.FormClosing
event, and set the Cancel
property appropriately.
Subscribe to this event in the Load
event.

leppie
- 115,091
- 17
- 196
- 297
-
How to stop form close after click close button. – Ravi Mar 23 '10 at 09:57
-
@Ravi: I told you how. I dont have time to spoonfeed, sorry. – leppie Mar 23 '10 at 10:04
0
Aren't you using the Model-View-Presenter pattern? If you are, you can override the OnCloseView method of the form's presenter.

Tachi
- 1,416
- 4
- 12
- 15