samir_ibrahim 58 Junior Poster

Hi

-I have a form where IsMdiContainer = True
-I add Split contaner which has 2 panel vertically (panel1 and panel2)
-In Panel1 I have buttons where every button should display a form in panel2

I want to display a form in the center of panel2
I had tried the below code and not working

frm_Login.TopLevel=False
frm_Login.Parent = Me.SplitContainer1.Panel2
Me.SplitContainer1.Panel2.Controls.Add(frm_Login)
frm_Login.StartPosition=FormStartPosition.CenterParent
''frm_Login.StartPosition=FormStartPosition.CenterScreen
frm_Login.Show

Should I do the math my self and assign Top and Left to the form?

TIA