Re: Mouse roller changes combobox SelectedItem not visible, wich fires SelectedIndexChanged event
- From: "Jared" <dont@xxxxxxxxx>
- Date: Sun, 22 Jul 2007 13:55:51 +1000
If you are looking at intercepting MouseRoll and nulling it out, here is some code I was typing today...
Public Class SpecialComboBox
Inherits ComboBox
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
Const WM_COMMAND As Int32 = 273
Select Case True
Case m.Msg = WM_COMMAND And m.WParam = New System.IntPtr(66536) 'intercepts WM_COMMAND (which prevent DropDownBox from closing after WM_LBUTTONDOWN)
'2 - (NEW) nulls MouseWheel on not .DropDown
If Not Me.DroppedDown Then
Exit Sub
End If
End Select
MyBase.WndProc(m)
End Sub
End class
.
- References:
- Prev by Date: Re: General question about deployment strategies for Dot Net 2.0 Winfo
- Next by Date: Question on WPF
- Previous by thread: Mouse roller changes combobox SelectedItem not visible, wich fires SelectedIndexChanged event
- Next by thread: DateTimePicker - how to show nothing when user has not specified a date?
- Index(es):