C# WinForm 改变控件在窗体上的显示位置

        设置控件的位置不可使用 Location.x  或者Location.Y 来设置控件的位置 

以下是解决的方法:

       第一种方法:

          //控制一个控件的显示位置
            button1.Top = 100;
            button1.Left = 100;

 

  第二种方法:

            //给一个控件赋值 的两种方法
            button1.Location = new Point(500,500);

posted @ 2012-04-23 08:57  至道中和  阅读(2614)  评论(0编辑  收藏  举报