Odpoviem si sám. Podstata:
Public Class Form1
Dim SumaPohybov As Integer
Private Sub Form1_MouseWheel(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseWheel
Dim SmerPohybu As Integer = e.Delta / 120
SumaPohybov = SmerPohybu + SumaPohybov
Me.Label1.Text = SumaPohybov
Me.HScrollBar1.Value = SumaPohybov
End Sub
End Class
|