Hi,
Does anyone know how to make startup position of MDI form child in the center of MDI form parent ?
Thanks
Printable View
Hi,
Does anyone know how to make startup position of MDI form child in the center of MDI form parent ?
Thanks
1. You could set the form's StartupPosition property to 1=CenterOwner
2. You could use this code in the form's load event;
Me.Left=(MDIForm.Width-Me.Width)/2
Me.Top=(MDIForm.Height-Me.Height)/2
That will work as long as the mdi form has no toolbar or statusbar otherwise it won't appear in the centre of the form.
Try this :
Me.Top = (MDIForm.ScaleHeight - Me.Height) / 2
Me.Left = (MDIForm.ScaleWidth - Me.Width) / 2