0

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.

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
Ravi
  • 1,263
  • 6
  • 17
  • 23

2 Answers2

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
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