鼠标移动到开始按钮上,则创建一个按钮,离开则删除
//鼠标光标进入按钮并创建按钮private void btn_Start_MouseEnter(object sender, EventArgs e)
{
Point p =new Point(MousePosition.X+50,MousePosition.Y+50);
Point P_bf = PointToClient(p);
Button btn_float=new Button();
btn_float.Location = P_bf;
btn_float.Size=new Size(150,50);
btn_float.Name = "123";
btn_float.Text = "魂叹啊";
this.Controls.Add(btn_float);
}
问题来了鼠标离开事件不知如何获取上面创建的新按钮
private void btn_Start_MouseLeave(object sender, EventArgs e)
{
this.Controls.Remove(xxoo);
//求高人指点xxoo --!
}