首先在窗体构造方法,里加入这样一句话 C#代码 C#代码 public FormAlarmInfoQuery() this.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseWheel); #endregion 然后写一个鼠标事件方法
如果输出了“滚动事件已被捕捉”,那么鼠标滚轮事件就成功被捕捉了,就可以在在里边写让鼠标滚轮处理的事件了 |
C#对鼠标滚轮的实现
最新推荐文章于 2024-04-01 17:36:57 发布