Friends,
I tried the following, but it never stopped the process when I released the mouse button:
Private Sub btnFaster_Hold(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles btnFaster.MouseDown
While Control.MouseButtons() = Windows.Forms.MouseButtons.Left
If tbSpeedThreshold.Value < 20 Then
tbSpeedThreshold.Value += 1
System.Threading.Thread.Sleep(500)
If Control.MouseButtons. = Windows.Forms.MouseButtons.None Then
SetSpeedThreshold()
Exit Sub
End If
End If
End While
End Sub
You can use a timer for that.