Maybe it's a silly question but I can't find a solution.
I have an MDI form with multiple children. There is one that I could say is the main one.
To detect that the principal is no longer used and another child form is used I use the 'Leave' event which works very well.
The problem is when from the mdi form, a modal type (.ShowDialog ()) is executed, the Leave event doesn't happen in the child form.
Any suggestion or comment on how to get it is welcome.