C#禁用numericUpDown控件鼠标中键滚轮消息响应
numericUpDown_roadgain.MouseWheel += new MouseEventHandler(Num_DiscountAmount_MouseWheel);
private void Num_DiscountAmount_MouseWheel(object sender, MouseEventArgs e)
{
HandledMouseEventArgs h = e as HandledMouseEventArgs;
if (h != null)
{
h.Handled = true;
}
}
参考:
http://www.jb51.net/article/34559.htm
numericUpDown_roadgain.MouseWheel += new MouseEventHandler(Num_DiscountAmount_MouseWheel);
private void Num_DiscountAmount_MouseWheel(object sender, MouseEventArgs e)
{
HandledMouseEventArgs h = e as HandledMouseEventArgs;
if (h != null)
{
h.Handled = true;
}
}
参考:
http://www.jb51.net/article/34559.htm