当鼠标移到button2按钮上时,按钮就移动位置,开始一直不成功,后来好像突然就开窍了,呵呵
Point p = new Point(10,10);
Point s=new Point(202,32);
private void button2_MouseEnter(object sender, EventArgs e)
{
if (this.button2.Location == s)
{
this.button2.Location = p;
}
else
{
this.button2.Location = s;
}
}
|