xrok
asked on
Simple Code for .net - Best way to close child form
i have an MDI application with multiple child forms..how do i close any open child forms so that only one child form is open at a time...
ASKER
how well does the Close function release the form object? i have critical memory management issues in my application..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hello!
Unfortunatelly, there is no Forms collection in VB.NET... So, you have to create your own collection. You'll find an example at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vaconCreatingYourOwnCollectionClass.asp
Unfortunatelly, there is no Forms collection in VB.NET... So, you have to create your own collection. You'll find an example at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vaconCreatingYourOwnCollectionClass.asp
ASKER
i was afraid of that. I will use hide instead. ty
assuming MDIParentForm1 to be an instance of the parent form in your mdi application,
dim i as integer = 0
for i=0 to MDIParentForm1.MdiChildren
MDIParentForm1.MdiChildren
next
dim child1 as new childform1()
child1.MDIParent = MDIParentForm1
child1.Show()