Created
June 27, 2011 14:52
-
-
Save afrael/1049017 to your computer and use it in GitHub Desktop.
Disabling MouseWheel behavior
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in form InitializeComponent(), or in the form's constructor | |
this.cboBox.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.cboBox_MouseWheel); | |
// event implementation | |
private void cboBox_MouseWheel(object sender, System.Windows.Forms.MouseEventArgs e) | |
{ | |
HandledMouseEventArgs mouseWheelEvent = (HandledMouseEventArgs)e; | |
mouseWheelEvent.Handled = true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment