FormClosing vs. WindowClosing: Who should go first?

Docking/MDI for Windows Forms Forum

Posted 12 years ago by Anthony Martin
Version: 2.0.0075
Avatar
I have event handlers for mainForm.FormClosing and dockmanager.WindowClosing.

When I close a DocumentWindow, I dispose of it. TabbedMdiWindowCloseReason = User

When I close the main form using the "X" in the upper right, DocumentWindows start closing (TabbedMdiWindowCloseReason = User) before the FormClosing event is handled and I give an "Are you sure?" message. If the user presses "Cancel", my document windows are already gone.

Is there a way to either get the mainForm.FormClosing handler to go first or to add a new TabbedMdiWindowCloseReason, Form?

Comments (1)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Anthony,

When I try in the DockForm sample, I get a TabbedMdiWindowCloseReason.Programmatic when the big parent Form's X is clicked. Can you try the latest maintenance release and let me know if you see differently?


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 6 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.