Maximize MDI Child [RESOLVED]
Ok-
So I've got my MDI form which loads at startup. My problem now is this.
I would like one my MDI Childed (MDIChild = True) forms to open up Maximized in the MDI Parent, however, even when set to maximized it does not work. Also, I would like to change this form to non-resizable, but I cannot select this option - it gives me an error.
A second form, I would like to be non-resizable and CENTERED (not maximized) in the MDI parent. Again, I can set the form to CenteredOwner, but it doesn't work.
Can these be done?
Re: Maximize MDI Child [RESOLVED]
There should be no problems when setting a MDIChild to maximum size (if you have choosen Fixed single then it will not work)
If you want it to be non-resizable (as Fixed single) and mazimized then use None(-border) and maximize it as below.
Try:
VB Code:
Form1.Height = MDIForm1.ScaleHeight
Form1.Width = MDIForm1.ScaleWidth
To center a MDIChild try:
VB Code:
Form1.Left = MDIForm1.ScaleWidth / 2 - Form1.ScaleWidth / 2
Form1.Top = MDIForm1.ScaleHeight / 2 - Form1.ScaleHeight / 2
If you try to center a MDIChild you will get a Invalid Property Value.
From MSDN:
The initial size and placement of MDI child forms are controlled by the Microsoft Windows operating environment unless you specifically set them in the Load event procedure.