12.8 //控件大小改变 button2.Size = new Size(50, 50); //控件坐标位置移动
int x = this.ClientSize.Width - button2.Width; int y = this.ClientSize.Height - button2.Height; Random r = new Random(); button2.Location = new Point(r.Next(0, x + 1), r.Next(0, y + 1)); |
|
来自: 工厂应用 > 《51自学网C#学习笔记》