There are 5 child forms in an MDI Parent Form.When I close the MDI Parent Form it fires first close event of child form.Actually i have written some code on Child Close form.
I donot want to fire child close event when i close theMDI Parent Form.
Is there any way so that when i close MDI Parent form it checks whether this close is clicked by MDI parent form or by Child Form close click.
CBClay Burch Syncfusion Team July 21, 2002 11:54 PM
In the Parent Form, you can catch a click on the parent Form's System Menu Close box using the FAQ referenced below. The idea is to override WndProc, and look for a SYSCOMMAND call to SC_CLOSE. If you don't want the close to go through, just return without calling the baseclass.
How can I tell if a form is closed from the controlbox (system menu) or from a call to Form.Close?
Check it out at: