by Angsuman Banerji (23 Submissions)
Category: Miscellaneous
Compatability: VB.NET
Difficulty: Unknown Difficulty
Originally Published: Fri 4th January 2008
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Scrolling on the Middle Mouse Button
API DeclarationsPrivate m_cMiddleScroller As cMiddleButtonScroller
' Create the middle button scroller
Set m_cMiddleScroller = New cMiddleButtonScroller
End Sub
Private Sub txtSample_MouseDown( _
Button As Integer, Shift As Integer, _
X As Single, Y As Single _
)
If (Button = vbMiddleButton) Then
With m_cMiddleScroller
.HorizontalMode = ePixelBased
.VerticalMode = eLineBased
.StartMiddleScroll txtSample.hwnd
End With
End If
End Sub