martin2k

Google
 
Web www.martin2k.co.uk

How do I resize MDI Child Forms?

Question


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


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


Comments

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?

Please fill in the below form if you have any comments or additional information you want to add about the above information.  If you have any Visual Basic 6.0 questions, please visit the ForumAny questions sent using this form will be ignored.

* - Mandatory

*Name: E-mail:

*Comments:

*Please type the following code (your comment will not be accepted without it):


Martin Allen 1999 - 2005.  Last updated Sunday 12 June 2005 04:49:11 PM +0100.