How do I resize MDI Child Forms?



Read and add posts to the Visual Basic 6.0 Forums

Download some of my programs and OCXs

Read the Tips here

The old style forum is still available here




From: devin
Date: 27-12-01 15:53
Subject: Resizing MDI Child Forms
Question: I resize my MDI child windows before execution, but it is ignored when the program is run. The size of the child window seems to depend entirely on the size of the MDI parent window. The bigger or smaller I set the MDI parent form before execution, the bigger or smaller the child form is when it is opened during runtime. How can I adjust the size of my MDI child forms independantly from the size of the parent?

Answer by David Carter:

In the MDI Child Form LOAD procedure, do this...
lets say FORM1 is a mdi child...


to center the child on the MDI form do this...put this in the child LOAD procedure underneath the form1.width and form1.height steps...


Archived Comments

From: sohail
Date: Tuesday, March 29, 2011 at 14:23:19
Comments: the code is ok but not exactly center
I add this - 800
From: Deepak Shitole
Date: Thursday, March 19, 2009 at 17:29:18
Comments: Thanks a lot boss
From: Eric
Date: Thursday, March 5, 2009 at 03:44:05
Comments: here is the code

me.dock = dockstyle.fill
From: justine
Date: Thursday, October 16, 2003 at 06:43:49
Comments: how can we resize form? i want my form to be much larger than the screen size.Help!
Reply: This is not possible.  Why do you want to do this?

Martin Allen 1999 - 2012.  Last updated Wednesday 26 December 2012 07:17:16 PM -0000.