Home > DeveloperSection > Forums > Scroll in NumericUpDown
marcel ethan
marcel ethan

Total Post:105

Points:735
Posted on    January-28-2014 11:38 PM

 C# C# 
Ratings:


 1 Reply(s)
 1180  View(s)
Rate this:

I want to have an event triggered when I scroll in my NumericUpDown. This code seems to ignore the scrolling when I'm inside a NumericUpDown:

public Form1()

{

    InitializeComponent();

    MouseWheel += new MouseEventHandler(mousewheel);

}

void mousewheel(object sender, MouseEventArgs e)

{

    System.Windows.Forms.MessageBox.Show("message");

}



Pravesh Singh

Total Post:411

Points:2881
Posted on    January-29-2014 12:41 AM

Hi Marcel,

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");

    }


Don't want to miss updates? Please click the below button!

Follow MindStick