VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

How to detect if mousewheel scrolls

Ian Gorse  (6 Submissions)   Windows API Call/Explanation   Visual Basic 3.0   Intermediate   Wed 3rd February 2021

This snippet will detect if the mouse wheel scrolls, it does not detect if there is a scroll up/down, i do not know how to do that.

Assumes
Add a timer, set inteval to 1. Add a listbox.

API Declarations
Private Declare Function GetMessage Lib "user32" Alias "GetMessageA" (lpMsg As Msg, ByVal hwnd As Long, ByVal wMsgFilterMin As Long, ByVal wMsgFilterMax As Long) As Long
Private Declare Function DispatchMessage Lib "user32" Alias "DispatchMessageA" (lpMsg As Msg) As Long
Private Type POINTAPI
x As Long
y As Long
End Type
Private Type Msg
hwnd As Long
message As Long
wParam As Long
lParam As Long
time As Long
pt As POINTAPI
End Type

Rate How to detect if mousewheel scrolls (4(4 Vote))
How to detect if mousewheel scrolls.bas

How to detect if mousewheel scrolls Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters