Search for constant WHEEL_DELTA

I am handling a mouse wheel event in UserControl that inherits NumericUpDown

Private Sub MyUpDown_MouseWheel(sender As Object, e As MouseEventArgs) Handles Me.MouseWheel
    Me.Value += e.Delta * Me.Increment ' / WHEEL_DELTA
End Sub

MouseEventArgs.Delta has this hint:

Gets the signed counter of the number of stops that the mouse wheel has rotated, multiplied by the constant WHEEL_DELTA. Stop one serrated mouse wheel.

However, I cannot find this constant. Usually it is 120, but I do not want the bank usually. How can I pass it to my code?

+3
source share
1 answer

In most cases, MSDN, Most applications should check for a positive or negative value rather than an aggregate total.I saw only one commit movement per click - they could develop quickly, but 1 tick (e.Delta = 120) per click.

To get the Delta MouseWheel ratio:

 WheelDelta As Integer = SystemInformation.MouseWheelScrollDelta

System.Windows.Forms , ..

+2

All Articles