Hello:
I have a MDIParent that calls an MDIChild. Within the MDIParent there is code right after the call to the MDIChild. I do not want the code to be executed untill the MDIChild closes. I have tried to call the MDIChild.ShowDialog() but I cant get it to work. Can someone help me out?
Loading

Nainil148 reputationPosted Mar 5, 2010, 10:20 AM EST
Not a problem. I have attached a sample project. I have marked the section using comments from where you need to move the code (located in function openToolStripMenuItem_Click(object sender, EventArgs e) of FormICEPack class).
You should move the code from that block to the function void oLogin_MdiClosedEvent() in FormICEPack class.
Let me know if this helps.
Nainil148 reputationPosted Mar 5, 2010, 9:57 AM EST
You can subsribe to the MDIChild's FormClosing event in the MDIParent class. In the subscribed event, you can then execute the MDI Parent's code. Let me konw if I am not clear.
GustavoRank #1,990 · 732 reputationPosted Mar 5, 2010, 10:13 AM EST
Sorry, I dont understand... I learn so much easier if I have sample code...LOL.
GustavoRank #1,990 · 732 reputationPosted Mar 5, 2010, 10:26 AM EST
Interesting... I will play with it and get back to you. Will take me a while... Thanks.
GustavoRank #1,990 · 732 reputationPosted Mar 5, 2010, 10:54 AM EST
YES... It works GREAT.... Thanks.