martin2k

ForumsVB6GamesSoftwareDirectoryHTMLArticlesBlogContact

How do I resize MDI Child Forms?


 

Home

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

Contact


 

Question

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...

form1.width=whatever
form1.height=whatever

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...

form1.top=(screen.height-form1.height)/2

form1.left=(screen.width-form1.width)/2


blog comments powered by Disqus

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
form1.top=(screen.height-form1.height)/2 - 800
form1.left=(screen.width-form1.width)/2
 
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.