|
-
Feb 8th, 2000, 11:39 PM
#1
Thread Starter
Hyperactive Member
Every time I Start a program with a MDI child in the MDI parent form, It starts it in the Top left portion of the parent form.
I need the form to start centered...
is this possible???
-
Feb 8th, 2000, 11:43 PM
#2
Frenzied Member
You can always put this in the Load event of the child form;
Me.Left=(MDIForm.Width-Me.Width)/2
Me.Top=(MDIForm.Height-Me.Height)/2
In VB6 you can set the StartupPosition Property of the child form to CentreOwner.
------------------
Mark "Buzby" Beeton
VB Developer
[email protected]
-
Feb 9th, 2000, 01:02 AM
#3
PowerPoster
I ha the same problem, so I used this
Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2 - frmMDI.Toolbar1.Height
Only include the toolbar bit if your main form has a toolbar. Put it in the form_load.
Good luck!
------------------
- Chris
[email protected]
Q. Why do mice have small balls?
A. Not that many know how to dance
-
Feb 9th, 2000, 12:01 PM
#4
Thread Starter
Hyperactive Member
Actually I can't make the start up posistion = to center owner... it gives me an error of invalid property value.
I have VB 6
?
The other option works, but the main form I just have maximized. and that only takes into account the property values of the acutal form. I want this to be able to be runa nd look good on various screen sizes and resolutions.
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
|