鼠标离开事件执行不及时怎么办? 本帖最后由 yysyangyangyangshan 于 2011-09-21 10:36:41 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我打断点,当快速移动鼠标时mouse_Leave确实没有执行。再或者有没有别的方式可以实现 鼠标离开控件控件隐藏 这个功能呢? private void OnMouseMove(object sender, MouseEventArgs e) { if ((e.X > 0) && (e.X < this.picture.Width) && (e.Y > 0) && (e.Y < this.picture.Height)) { this.picture.BackgroundImage = this.bmpMouseOn; SetCapture(this.picture.Handle); this.Cursor = Cursors.Hand; } else { this.picture.BackgroundImage = this.bmpMouseNotOn; ReleaseCapture(); this.Cursor = Cursors.Arrow; } } 有可能是Lz在其他的鼠标事件中也写有代码,冲突了,变量溢出了等等或者是鼠标根本没进入panel而是晃过去了 求教:C#与Sql Server镜像服务器连接字符串 怎么才能点关闭按钮不直接退出程序? vs2008逐句要怎么用 疯了 调用窗体的问题 调数据库出错 请问C#中怎么访问Access数据库 火急 & 有奖 C#模拟提交表单post方式。但是表单中有一个项是需要附件上传带附件 如何实现! VS 2005如何连接SQL Server 2005? 关于数组的绑定 求DATAGRIDVIEW操作数据库方案 C#如何编写一个随机验证码的应该程序最好是DLL模块
再或者有没有别的方式可以实现 鼠标离开控件控件隐藏 这个功能呢?
{
if ((e.X > 0) && (e.X < this.picture.Width)
&& (e.Y > 0) && (e.Y < this.picture.Height))
{
this.picture.BackgroundImage = this.bmpMouseOn;
SetCapture(this.picture.Handle);
this.Cursor = Cursors.Hand;
}
else
{
this.picture.BackgroundImage = this.bmpMouseNotOn;
ReleaseCapture();
this.Cursor = Cursors.Arrow;
}
}
或者是鼠标根本没进入panel而是晃过去了