Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Timer1.Interval = TextBox1.Text * 1000 + TextBox2.Text
AutoClick()
If GetAsyncKeyState(Keys.F5) Then
Timer1.Start()
End If
If GetAsyncKeyState(Keys.F6) Then
Timer1.Stop()
End If
End Sub
Private Declare Function GetKeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer
Dim iCounter As Integer = 0
Private Sub tmrHotkey_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrHotkey.Tick
Dim HotkeyStart As Boolean = GetKeyPress(Keys.F6)
Dim HotkeyStop As Boolean = GetKeyPress(Keys.F7)
If HotkeyStart Then
tmrStatus.Start()
End If
If HotkeyStop Then
tmrStatus.Stop()
lblTimerStatus.Text = "Timer is stopped."
lblTimerStatus.ForeColor = Color.Red
'iCounter = 0
End If
lblCounter.Text = iCounter
End Sub
Private Sub tmrStatus_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrStatus.Tick
lblTimerStatus.Text = "Timer is started."
lblTimerStatus.ForeColor = Color.Green
iCounter += 1
End Sub
Private Sub btnStartTmr_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStartTmr.Click
MsgBox("Use the hoykeys instead", MsgBoxStyle.Information, "Info")
End Sub
Private Sub btnStopTmr_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStopTmr.Click
MsgBox("Use the hoykeys instead", MsgBoxStyle.Information, "Info")
End Sub
.