首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在NumericUpDown中滚动

在NumericUpDown中滚动
EN

Stack Overflow用户
提问于 2013-12-25 12:46:14
回答 1查看 1.3K关注 0票数 0

当我在NumericUpDown中滚动时,我希望触发一个事件。当我在NumericUpDown中时,这段代码似乎忽略了滚动:

代码语言:javascript
复制
public Form1()
{
    InitializeComponent();
    MouseWheel += new MouseEventHandler(mousewheel);
}

void mousewheel(object sender, MouseEventArgs e)
{
    System.Windows.Forms.MessageBox.Show("message");
}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-12-25 12:59:05

代码语言:javascript
复制
    public Form1()
    {
        InitializeComponent();
        numericUpDown1.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.numericUpDown1_MouseWheel);
    }

    private void numericUpDown1_MouseWheel(object sender, System.Windows.Forms.MouseEventArgs e)
    {
        MessageBox.Show("hello");
    }
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20772933

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档