【发布时间】:2011-05-24 17:08:23
【问题描述】:
如何在 C# 中捕获面板上的鼠标滚轮? 我正在使用 WinForms
编辑:
我现在尝试在PictureBox 上做。
我的代码:
this.pictureBox1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseClick);
this.pictureBox1.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseClick);
private void pictureBox1_MouseClick(object sender, MouseEventArgs e)
{
MessageBox.Show("Click");
}
点击有效。惠灵没有。 为什么?
【问题讨论】:
标签: c# .net winforms visual-studio-2010