I\'m attempting to detect, on the MDI parent, when my MDI child form closes, and react accordingly. The MDI parent shouldn\'t do anything until the MDI child closes. Here is
Why you are doing so many things when you can just invoke an event handler of MDI Parent to MDI Child?
Suppose I want to do certain things when my child will be activated or deactivated. You just need to declare some event handlers of MDI Parent (as e.g. SetupToolStripMenu_PlantMasterRecipe
) and mention some logic inside that what you want to do. By this way, you can control each object behaviour of MDI Child from MDI Parent.
Here objB is my Child form and I am writing this code inside MDI Parent:
objB.MdiParent = this;
objB.Activated += SetupToolStripMenu_PlantMasterRecipe;
objB.Deactivate += DisposeToolStripMenu;
objB.Show();