Click to See Complete Forum and Search --> : HELP VERY VERY URGENT
PITBULLCJR
Jan 15th, 2000, 02:27 AM
Please help I am doing it as we speak. How do you get a mdichild form to center on the mdi form? If I click center on owner it gives me an error and same with center on screen. it says invalid propery value. I do have the mdiform starting first and the mdichild is set to true on the form i want to center so Please help!!!
------------------
Sincerely,
Chris
:-) ;-)
Email pitbullcr7@aol.com
MicahCarrick
Jan 15th, 2000, 03:22 AM
You could center it manually ... ie
Form1.Left = (MDIForm1.ScaleWidth / 2) - (Form1.ScaleWidth / 2)
Form1.Top = (MDIForm1.ScaleHeight / 2) - (Form1.ScaleHeight / 2)
------------------
Micah Carrick
http://micah.carrick.com
micah@carrick.com
ICQ: 53480225
r0ach
Jan 15th, 2000, 03:27 AM
Create a Procedure called Center in a Module
Add the following code to it:
Public Sub Center(Child As Form, Parent As Form)
Child.Top = (Parent.Height - Child.Height) / 2
Child.Left = (Parent.Width - Child.Width) / 2
End Sub
Then, put this in the child form's load event:
Center Me, MDIForm1
That should help a bit ;)
------------------
r0ach(tm)
X_Darknight_X
Jan 15th, 2000, 03:28 AM
I think this should do it:
Form1.Left = (MDIForm1.ScaleWidth / 2) - (Form1.Width / 2)
Form1.Top = (MDIForm1.ScaleHeight / 2) - (Form1.Height / 2)
------------------
David Underwood
Teen Programmer
ICQ - 14028049 (http://www.icq.com/14028049)
E-mail - darknight23@hotmail.com
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.