Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Centering child mdi form? 1

Status
Not open for further replies.

savok

Technical User
Jan 11, 2001
303
AT
How do I center a child mdi form?

I tried to set StartUpPosition to CenterOwner or CenterScreen but it gives an Invalid Property Value error?

thanks!
 
Do it in the Child form load event

CForm1.Left = (MDIForm1.ScaleWidth / 2) - (CForm1.Width / 2)
CForm1.Top = (MDIForm1.ScaleHeight / 2) - (CForm1.Height / 2)

Robert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top