![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
1 public void MourseLeave() 2 { 3 bool b = this.RectangleToScreen(this.ClientRectangle).Contains(MousePosition); 4 5 //Point SQButtonPoint = this.PointToScreen(this.ClientRectangle.Location); 6 //Point MoursePoint = Control.MousePosition; 7 //bool MourseSQButton = SQButtonPoint.X + this.Width >= MoursePoint.X && MoursePoint.X >= SQButtonPoint.X && MoursePoint.Y >= SQButtonPoint.Y && SQButtonPoint.Y + this.Height >= MoursePoint.Y; 8 if (!b) 9 { 10 this.BackColor = _NormalColor; 11 } 12 }