Click to See Complete Forum and Search --> : mdi form


swamivishal1
March 26th, 2004, 11:38 AM
dear friends

i m facing a strange problem while using mdi form

whenever i use the mdi form and declare its child forms

when i call the child form i want that child form yo start at the center of the parent form

i declare the startupposition as centertoparent but still it is not coming at the center.


this is quite strange and i m finding no solution of it.


kindly help me out of it.

thanx in advance.

Craig Gemmill
March 26th, 2004, 12:44 PM
If you want the form to show centered in the MDI parent, you will have to put it there yourself:


Dim x As New Form1
x.MdiParent = Me
x.Show()

'Now place the form where you want it (centered here)
x.Location = New Point(CType((Me.ClientSize.Width - x.Width) / 2, Integer), CType((Me.ClientSize.Height - x.Height) / 2, Integer))