[PHP]Private Sub Hotkeys_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Hotkey.Tick
Dim hotkey1 As Boolean
hotkey1 = GetAsyncKeyState(Keys.F5)
If hotkey1 = True Then
Hotkey.Start()
Dim hotkey2 As Boolean
hotkey2 = GetAsyncKeyState(Keys.F6)
If hotkey2 = True Then
Hotkey.Stop()
End If
End If
End Sub[/PHP]
when i press f6 timer1 (hotkey) doesn't stop! WHY?
Originally Posted by m_t_h
yes.. aggain
[PHP]Private Sub Hotkeys_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Hotkey.Tick
Dim hotkey1 As Boolean
hotkey1 = GetAsyncKeyState(Keys.F5)
If hotkey1 = True Then
Hotkey.Start()
Dim hotkey2 As Boolean
hotkey2 = GetAsyncKeyState(Keys.F6)
If hotkey2 = True Then
Hotkey.Stop()
End If
End If
End Sub[/PHP]
when i press f6 timer1 (hotkey) doesn't stop! WHY?
[PHP]Private Sub Hotkeys_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Hotkey.Tick
Dim hotkey1 As Boolean
hotkey1 = GetAsyncKeyState(Keys.F5)
If hotkey1 = True Then
Hotkey.Start()
Dim hotkey2 As Boolean
hotkey2 = GetAsyncKeyState(Keys.F6)
If hotkey2 = True Then
Hotkey.Stop()
End If
End If
End Sub[/PHP]
when i press f6 timer1 (hotkey) doesn't stop! WHY?
[php]Private Sub Hotkeys_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Hotkey.Tick
Dim hotkey1 As Boolean
hotkey1 = GetAsyncKeyState(Keys.F5)
Dim hotkey2 As Boolean
hotkey2 = GetAsyncKeyState(Keys.F6)
If hotkey1 = True Then
Hotkey.Start()
elseif hotkey2=true then
hotkey.stop()
End If
End Sub
[/php]
Both your solutions should work?
"should".. brb
still; when i press f6 is ok: it stopps but when i press f5 to start it doesn't work
Originally Posted by ilikewaterha
Both your solutions should work?
They're both exactly the same haha, cept we declared our variables slightly different.
They "will" work and if they don't, it's not our fault
Originally Posted by J-Deezy
They're both exactly the same haha, cept we declared our variables slightly different.
They "will" work and if they don't, it's not our fault
doesn't -.-
EDIT: Were you born stupid? This code is turning the timer OFF...how the fuck can it check for keypress if you've just turned it off...
Originally Posted by m_t_h
[php]Handles Hotkey.Tick[/php]
If you turn Hotkey off with F6, and it's the timer controlling what happens when keys are pressed, ofc nothing will happen
still same... f5 doesn't work! ( the start)
Originally Posted by m_t_h
still same... f5 doesn't work! ( the start)
Read my post -.-
Originally Posted by J-Deezy
EDIT: Were you born stupid? This code is turning the timer OFF...how the fuck can it check for keypress if you've just turned it off...
If you turn Hotkey off with F6, and it's the timer controlling what happens when keys are pressed, ofc nothing will happen
im not that stupid -.-
Originally Posted by m_t_h
doesn't -.-
[php]Private Sub Hotkeys_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Hotkeys.Tick
Dim hotkey1 As Boolean
hotkey1 = GetAsyncKeyState(Keys.F5)
Dim hotkey2 As Boolean
hotkey2 = GetAsyncKeyState(Keys.F6)
If hotkey1 = True Then
Hotkeys.Start()
elseif hotkey2=true then
hotkeys.stop()
End If
End Sub [/php]
You're adding code to the timer named "Hotkey" when you press F6 the timer named "Hotkey" is turned off and therefore anything contained within it is null and void. Make another timer, call it Hotkeys NOT hotkey then add our code to it.
Originally Posted by m_t_h
doesn't -.-
Enable = true
interval = 1
[php]Private Sub Hotkeys_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Hotkey.Tick
Dim Hotkey As Boolean = GetAsyncKeyState(Keys.F5)
Dim hotkey1 As Boolean = GetAsyncKeyState(Keys.F6)