Question regarding MDIParent form and child forms

  • Thread starter Thread starter Jon Pope
  • Start date Start date
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
 
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
 
Back
Top