-
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 [email protected]
-
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
[email protected]
ICQ: 53480225
-
Create a Procedure called Center in a Module
Add the following code to it:
Code:
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:
Code:
Center Me, MDIForm1
That should help a bit ;)
------------------
r0ach(tm)
-
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
E-mail - [email protected]