Home All Groups Group Topic Archive Search About
Author
22 Feb 2006 7:28 PM
m.fisher
I have a MDI app in Visual Basic.Net 2003.  When I open the first child
form it opens in the correct location at the top left.  If I open
another it again opens correctly, slightly below and to the right of
the first.  If I close any or both of these forms, and then open
another it does not open in the correct location.  It seems as though
the app still thinks the first two forms are open.  Another example; if
I open the first form, then close it, and open another, it does not
start in the top left, but it still thinks the closed form is there.
This is not the way Word/Excel works, where child forms always seem to
take the top left postion if available.

Any Ideas?

Author
22 Feb 2006 7:44 PM
jvb
Add

Me.LayoutMdi(MdiLayout.Cascade)

after you add the child form, this will recascade the windows. It will
also resize the windows as well, you will have to add code to persist
the window sizes.

J
Author
22 Feb 2006 8:27 PM
m.fisher
That works fine - thanks.
Author
22 Feb 2006 8:50 PM
jvb
Your welcome.
Author
23 Feb 2006 6:45 AM
Pascal
hello

In another way is it possible to clean everything when the "mdichild form"
close?
you said :"It seems as though the app still thinks the first two forms are
open.  "
Isn't it because some informations about those forms are still in memory
when you leave?
I think i've got the same problem with a mdi child which still remains the
value of some variables even after closing it.
Does somebody know the good way for opening and closing a mdi child to keep
the memory clean ?
thanks