private void button2_MouseEnter(object sender, EventArgs e)
{
//给按钮一个新的坐标 这个按钮活动的最大宽度 就是 窗体的宽度减去按钮的宽度
int x = this.ClientSize.Width - button1.Width;
int y = this.ClientSize.Height - button1.Width;
Random r = new Random();
//要给按钮一个随机的坐标
button2.Location = new Point(r.Next(0, x+1),r.Next(0,y+1));
}