Design time events

How to resolve if current root designer begin to close, in other words we click close button on designer window?
[112 byte] By [AlexU] at [2007-12-23]
# 1
Moved to Windows Forms Designer forum.

nobugz at 2007-8-30 > top of Msdn Tech,Windows Forms,Windows Forms Designer...
# 2

Alex,

What do you want to resolve? Someone clicks the close button and you want to know then stop it from closing or something?

Ken_Bussell at 2007-8-30 > top of Msdn Tech,Windows Forms,Windows Forms Designer...
# 3
We have a project in design time. Project exists with one form for example. We click on form file in Visual Studio solution explorer to edit it in design time and we see root form editor. We edit some components on this form, save, and then close this designer in Visual Studio. I want to catch exactly this closing.
AlexU at 2007-8-30 > top of Msdn Tech,Windows Forms,Windows Forms Designer...
# 4
Override the OnClosing method of that form. If you want to cancel the closing, set CancelEventArgs.Cancel to true.
Quirk at 2007-8-30 > top of Msdn Tech,Windows Forms,Windows Forms Designer...
# 5

Hallo AlexU,

one possibility is to implement a custom designer for all forms
or for a component that is located on all forms and override its
Dispose().

HTH,
Dima.

DRaiko at 2007-8-30 > top of Msdn Tech,Windows Forms,Windows Forms Designer...
# 6
I read this two answers, and then i hade brain-wave, i try to use IEventBindingService to atach to form closing event.
AlexU at 2007-8-30 > top of Msdn Tech,Windows Forms,Windows Forms Designer...