怎么设置布局,让窗体中的控件能够居中显示,就是窗体最大化或把窗体拉大,拉小,控件都能够按原来的布局,整体居中

解决方案 »

  1.   

    把你得控件 都画到 PANEL上 然后 private void Form1_Layout(object sender, LayoutEventArgs e)
            {
                panel1.Location = new Point(
                    (this.Size.Width-panel1.Size.Width )/2
                    ,(this.Size.Height-panel1.Size.Height)/2
                    );
            }