How to know what MDI Child Form just closed ?
Posted on 2006-06-14
MDI Parent with several child forms. All forms can only be instantiated once (already have the code for this).
There is a childform which opens another childform.
without MDI, i could call this other form with ShowDialog, and use the DialogResult as a trigger in the calling form to know when the form is closed, so I can trigger a reaction.
Now, since I moved the app. to an MDI app, I can not use the ShowDialog anymore since I want all the forms INSIDE the MDI application. I don't want to work around that.
The events of the MDIParentForm include an MdiChildActivate event, but it does not include an MdiChildClose event.
So, the question boils down to the title: how can I know know what MDI Child Form just closed ? Is there an event for it, somewhere ? Can I attach an event to something ?
Or do I have to revert to writing a function in my MDIParent which I call from all the FormClosed() events of the child form ?
As a last thing, I really don't want to use a timer for this, unless it is the best solution proposed by the Experts.
thx in advance,