Hi !
I have a problem with creating a hotkey (GetAsyncKeyState) that will turn timer on with F1 button and turn it off with same button.
I finally did it,however after i press F1 to turn it off, i cant turn it on anymore..
My hotkey timer codE:
Could someone fix this, so after i press F1 to turn off the timer, i will be still able to turn it on with pressing F1 again?
I have a problem with creating a hotkey (GetAsyncKeyState) that will turn timer on with F1 button and turn it off with same button.
I finally did it,however after i press F1 to turn it off, i cant turn it on anymore..
My hotkey timer codE:
Code:
Private Sub hotkey_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles hotkey.Tick
Dim mykey As Boolean
mykey = GetAsyncKeyState(Keys.F1)
If mykey = True Then
Timer1.Enabled = True
If turnedON = True Then Timer1.Enabled = False
End If
End Sub