I have a form with a dockmgr. In the doc manager I have documents docked as Fill, and two tool windows that I'll reuse for each document. I want to give the user the option to cancel when closing from the toolbar icon X button if he/she hasn't saved the document. I'm setting e.Cancel to True. I see that the DockDotNet code is making the form invisible prior to firing the event, and after the event is fired, it's closing the window as well (in IsVisible).
I apologize ahead of time if I'm missing something in WindowsForms. Is it possible that cancelling the FormClosing event only applies to modal forms? That seems to be my experience.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a form with a dockmgr. In the doc manager I have documents docked as Fill, and two tool windows that I'll reuse for each document. I want to give the user the option to cancel when closing from the toolbar icon X button if he/she hasn't saved the document. I'm setting e.Cancel to True. I see that the DockDotNet code is making the form invisible prior to firing the event, and after the event is fired, it's closing the window as well (in IsVisible).
I apologize ahead of time if I'm missing something in WindowsForms. Is it possible that cancelling the FormClosing event only applies to modal forms? That seems to be my experience.