Preventing close of MDI Parent with TabbedMDIManager

I am using the TabbedMDIManager (4.1.0.9) and I need to be able to conditionally prevent the MDI Parent form from being closed by the user. I have tried adding code to the MyBase.Closing event to prevent the close attempt by: e.Cancel = True Exit Sub Although this code runs, the parent mdi form still closes. Any suggestions about how to conditionally prevent the parent mdi from being closed by the user?

1 Reply

MJ Mano J Syncfusion Team January 11, 2006 07:58 AM UTC

Hi Bob, We regret for the inconvenience. This is because of known issue # 1343, which has been fixed internally and this fix will be available in our final release of v.4.1. Defect # 1343 - TabbedMDIManager makes closing event not to work properly. However, the following workaround might help you in this regard. if (MessageBox.Show("Do you want to save and close?", "Save", MessageBoxButtons.OKCancel) == DialogResult.OK) e.Cancel = false; else e.Cancel = true; Please let us know if you have any questions. Regards, Mano

Loader.
Up arrow icon