Closing MDI Parent form

Does closing MDI parent form with close() method close it childs? or I have to loop through MDIChildren and close each one before calling close() method of the MDI parent form?
f_asmaaAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
RacinRanConnect With a Mentor Commented:
It does mean resources.  The children are objects that live in the mdichildren collection object of the parent.  Just like controls are objects that live in the forms control collection.

0
 
RacinRanCommented:
Yes, closing the MDIParent closes the child forms.  No, you do not have to loop through calling the close method of each child form.

Racin
0
 
f_asmaaAuthor Commented:
Have you reference for that?
0
 
RacinRanCommented:

"When a form is closed, all resources created within the object are closed "

from this msdn article:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformsformclassclosetopic.asp


What problem are you having?
0
 
f_asmaaAuthor Commented:
I have no problem. I read this sentence before but I thought that the resources mean file handler, images, controls and so on. I am not sure that MDI children are resources of MDI parent.

If I didn't get another answer today I will accept your answer.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.