• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 262
  • Last Modified:

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?
0
f_asmaa
Asked:
f_asmaa
  • 3
  • 2
1 Solution
 
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
 
RacinRanCommented:
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

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now