R
Rob
Hi all, I am just starting to write my first mdi app and get the
feeling that if you hit the 'X' in top-right mdi form to close it, the
order of events is as follows: all mdi child forms first get the
'closing' event, THEN they all get the 'closed' event. If this is true
then I don't know of any mdi app that behaves that way. I expect each
mdi child form to get the 'closing' AND 'closed' event before the next
mdi child gets both of those events. Bear in mind, that I am just
starting with this, so perhaps I am missing something obvious.
The problem is that if I put code in the 'closing' event of each child
to prompt user to save: yes, no, cancel, then say for example the user
answers 'yes' to the first child, that child should save and close
completely before the user is prompted to save the next child. I am
finding that all the child windows remain open, until user has
answered all prompts. This seems weird, especially if the user
cancells on say the third child, then the first two child windows
remain open, when in fact they should have been long gone.
Am I missing something? or is there a way to overwrite this behaviour
and close mid child forms in the order that I want. For example
something else that would be nice is if the 'closing' event on the
active form was called before any other form. Since I dissagree with
what appears to be the default behaviour, I'd like to have more
control over this. Can anyone help me find an example on how to do a
custom close of an mdi app.
BTW: I am using C# and what an awesome language, if I may say so. ;-)
Thank You,
Rob.
feeling that if you hit the 'X' in top-right mdi form to close it, the
order of events is as follows: all mdi child forms first get the
'closing' event, THEN they all get the 'closed' event. If this is true
then I don't know of any mdi app that behaves that way. I expect each
mdi child form to get the 'closing' AND 'closed' event before the next
mdi child gets both of those events. Bear in mind, that I am just
starting with this, so perhaps I am missing something obvious.
The problem is that if I put code in the 'closing' event of each child
to prompt user to save: yes, no, cancel, then say for example the user
answers 'yes' to the first child, that child should save and close
completely before the user is prompted to save the next child. I am
finding that all the child windows remain open, until user has
answered all prompts. This seems weird, especially if the user
cancells on say the third child, then the first two child windows
remain open, when in fact they should have been long gone.
Am I missing something? or is there a way to overwrite this behaviour
and close mid child forms in the order that I want. For example
something else that would be nice is if the 'closing' event on the
active form was called before any other form. Since I dissagree with
what appears to be the default behaviour, I'd like to have more
control over this. Can anyone help me find an example on how to do a
custom close of an mdi app.
BTW: I am using C# and what an awesome language, if I may say so. ;-)
Thank You,
Rob.