Question regarding MDIParent form and child forms

J

Jon Pope

I've got an MDI Parent which hosts several child forms. When the
application closes (either through a File|Exit call or by clicking on the
"X" in the upper right corner), I check to see if any of the children are
"dirty" and display a "Save\Save All\Save None" form similar to Query
Analyzer.

I had thought about putting the code to display this form within the MDI
Parent's "Closing" event, but the children's closing events are called prior
to this, and the data is already lost. How can I tell without using the
Parent's "closing" event that the MDI Parent is closing?

Or is there a better way to accomplish this?

Cheers, Jon
 
G

Guest

hi
you can do one thing
in the childs closing event check whether the child is dirty .if it is
dirty write e.Cancel=true ;
This will cancel the closing event of child and the parent

hope this solves your problem

regards
Ansil
Dimensions
Technopark
Trivandrum
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top