如题。Form1 newFrm = new Form1();
newFrm.Parent = tabPage1;
newFrm.show();这样增加到PAGE里的FORM是左上角显示的,如何让它在PAGE 居中显示
谢谢!

解决方案 »

  1.   

    设置Location = new System.Drawing.Point(w,h);
      

  2.   

    DOCK会令FORM变SIZE填满PAGE的吧。我只是让它居中就好了
      

  3.   

                Form1 fr = new Form1();
                fr.TopLevel = false;            fr.Parent = tabControl1.TabPages[0];
                Size sz= tabControl1.TabPages[0].Size;
                fr.Location = new Point((sz.Width - fr.Width) / 2, (sz.Height - fr.Height) / 2);
                fr.Show();计算中心位置,然后进行设置