想改变控件的Location属性怎么改?他说Location.X无法修改,因为不是变量

来源:百度知道 编辑:UC知道 时间:2024/05/30 14:13:15

this.Location = new System.Drawing.Point(47, 50);
要用这种方式吧
单独指定X和Y好像不行

可以通过
this.Location = new Point(x,y);
或者
this.SetBounds(x,y,width,height);

这都能改变控件的位置