MSDN say:
LoWord(wParam) = Control Keys
HiWord(wParam) = WheelDelta
LoWord(lParam) = x
HiWord(lParam) = y
But nothing on the number of lines to scroll...
Any ideas ?
thanks.
Here you go:
'***
Private Declare Function GetSystemMetrics Lib "user32" _
(ByVal nIndex As Long) As Long
Private Declare Function SystemParametersInfo Lib "user32" Alias _
"SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, _
ByRef lpvParam As Any, ByVal fuWinIni As Long) As Long
Private Const SM_MOUSEWHEELPRESENT = &H4B
Private Const SPI_GETWHEELSCROLLLINES = &H68
Private Const SPI_SETWHEELSCROLLLINES = &H69 ' In case you need it
Private Sub Form_Load()
Dim NumLines As Long
' Is there a mouse wheel?
If GetSystemMetrics(SM_MOUSEWHEELPRESENT) Then
' How many lines to scroll?
Call SystemParametersInfo( _
SPI_GETWHEELSCROLLLINES, 0, NumLines, 0)
MsgBox NumLines & " lines per notch", vbInformation, "Mouse wheel"
Else
MsgBox "No mouse wheel detected..", vbInformation, "Mouse wheel"
End If
Unload Me
End Sub
'***
Hope this helps,
Mike
-- EDais --
- Microsoft Visual Basic MVP -
WWW: Http://EDais.earlsoft.co.uk/
Work E-Mail: ED...@btclick.com
Other E-Mail: Mike....@btclick.com