|
-
Apr 12th, 2005, 05:00 PM
#1
Thread Starter
Fanatic Member
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?
Last edited by mateo107; Apr 12th, 2005 at 05:48 PM.
Reason: RESOLVED
-
Apr 12th, 2005, 05:31 PM
#2
Thread Starter
Fanatic Member
Re: Maximize MDI Child
Actually - I've managed to get the form to open sort of the way I need it to, but heres my current delema.
In order to have my form show up automatically, I have added the statement
frmName.Show into my On_Load Sub routine for the MDI Parent form. The only problem is that the MDI form takes control and is the active window, when really I need the frmName form to be the active window and the MDI parent form to remain open in the background.
Any ideas?
-
Apr 12th, 2005, 05:45 PM
#3
Fanatic Member
Re: Maximize MDI Child
 Originally Posted by mateo107
Actually - I've managed to get the form to open sort of the way I need it to, but heres my current delema.
In order to have my form show up automatically, I have added the statement
frmName.Show into my On_Load Sub routine for the MDI Parent form. The only problem is that the MDI form takes control and is the active window, when really I need the frmName form to be the active window and the MDI parent form to remain open in the background.
Any ideas?
You can't do that really, the MDI parent is meant to be the form that is in the foreground and all child forms are contained within this form, so you cant really make the parent form be open in the background; its not meant to be.
-
Apr 12th, 2005, 05:48 PM
#4
Thread Starter
Fanatic Member
Re: Maximize MDI Child
okay - i think i can get around it by making my splash screen (not MDI) the program startup screen... and then I can have that call my MDI form (do it backwards from what i have now)
thanks!
-
Apr 12th, 2005, 05:59 PM
#5
Lively Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|