03-29-2003, 09:05 AM
I need to have the mdichild forms in my app to be opened as maximised in the MDImainform and I can stop the user minimising by setting the property to false but can't stop the resizing button appearing. If I set the form type to non resizable it just doesn't show at all. I need all my MDIchildren to fill the main window when they are opened, and not be resizable.
03-29-2003, 02:43 PM
Set the borderstyle to none and the windowstate to maximized
03-30-2003, 10:15 AM
Help! When I do that it disappears altogether.
03-30-2003, 10:25 AM
The way I do it is set the BorderStyle to 3 fixed dialog. I leave the min
button on but you could turn that off. Set the size of the form to match
the scaleheight and scalewidth of the mdiform and it will be close to
03-30-2003, 11:26 AM
If I try either of those my child form disappears - I must have some other property incorrect - it shows alright if my child form is resizable but if I change this to fixed dialog or none it vanishes.
03-30-2003, 11:29 AM
Did you set it to be a MDIChild form? Could you do a small example
project, zip it up and attach it here?
03-30-2003, 12:08 PM
Yes, here it is with just one form that disappears when I change borderstyle
03-30-2003, 12:54 PM
First thing you have to do is set frmUtilities WindowState back to
0 - Normal. A fixed size window can't have that as Maximized. Then in
frmUtilities add the Resize event sub...
Private Sub Form_Resize()
Static inResize As Boolean
If Not inResize Then
inResize = True
Me.Move 0, 0, MDIMainWin.ScaleWidth, MDIMainWin.ScaleHeight
inResize = False
Now this won't resize the form to fill the mdi one if it gets resized so you
will have to either stop it (in its resize event) or keep resizing the child
form each time the mdi form gets resized. Something like...
Private Sub MDIForm_Resize()
frmUtilities.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight
Now this just isn't the same as having the form maximized but I can't be
sure what effect you are after.
03-30-2003, 12:58 PM
Thanks a lot - all I need is to have my child forms maximised so that the user only sees one at a time, but can use the menus etc. from the MDI form at any time.
03-30-2003, 09:48 PM
you could set the controlbox property to false on the MDI Child.
then you can use WindowState=Maximized
03-31-2003, 12:34 AM
Thanks a lot - all I needed to do was set controlbox=false and leave borderstyle= resizable and I get what I wanted.