
Originally Posted by
i00
Can't use WM_MOUSEWHEEL either because this ALSO occurs when the mouse is scroll wheel is actually turned and not after the content is actually scrolled.
Kris
OK, I only tried it using a form and just called MyBase.WndProc(m) before checking WM_MOUSEWHEEL...
Code:
Public Class Form1
Private Const WM_MOUSEWHEEL As Int32 = &H20A
Private Sub Form1_MouseWheel(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseWheel
Debug.WriteLine("Form Wheel = " & e.Delta)
End Sub
Protected Overrides Sub WndProc(ByRef m As Message)
Dim delta As Integer
MyBase.WndProc(m)
If m.Msg = WM_MOUSEWHEEL Then
delta = m.WParam.ToInt32 \ 65536
Debug.WriteLine("WndProc Wheel = " & delta)
End If
End Sub
End Class