Note: Forums will be making significant UX changes to address key usability improvements surrounding search, discoverability and navigation. To learn more about these changes please visit the announcement which can be found HERE.
capture Mouse Wheel event in c#.net 2005

Answered capture Mouse Wheel event in c#.net 2005

  • Friday, November 16, 2007 11:00 AM
     
     

     

    how to capture the Mouse Wheel event in c#.net 2005

     

    thanX

All Replies

  • Friday, November 16, 2007 12:27 PM
     
     Answered

    Here's how you do it if you're trying to get it on a WinForm.

     

    Code Block

    public Form1()

    {

    InitializeComponent();

    this.MouseWheel += new MouseEventHandler(Form1_MouseWheel);

    }

    void Form1_MouseWheel(object sender, MouseEventArgs e)

    {

    //Do Something

    }