[HELP]Whats wrong with this?
Yes its me, Golden. the noob back with another question

Whats wrong with this code?
Code:
Public Class Form1
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Int32) As Int16
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If GetAsyncKeyState(Keys.F5) Then
Timer1.Enabled = True
ElseIf GetAsyncKeyState(Keys.F6) Then
Timer1.Enabled = False
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If GetAsyncKeyState(Keys.F5) Then
Timer1.Enabled = True
ElseIf GetAsyncKeyState(Keys.F6) Then
Timer1.Enabled = False
End If
End Sub
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
If Timer1.Enabled = True Then
Label1.Text = "AFK BOT ENABLED, PRESS F6 TO DISABLE!"
Label1.ForeColor = Color.Green
ElseIf Timer1.Enabled = False Then
Label1.Text = "AFK BOT DISABLED, PRESS F5 TO ENABLE!"
Label1.ForeColor = Color.Red
End If
End Sub
End Class
Logic... as soon as you stop the timer you cant get it to work again... <.< and why the hell you have the key check on form load? no reason...
Your timer will only start when you press the key, which is being checked if pressed on the timer it self... So... you see whats the problem there? (and why a label click?)
Ok, Techial helped me out over teamviewer :P
Another noob question ( i havent used VB in a month... ) whats the word for space
Because
SendKeys.Send("{Space}") is wrong.?
Lol no,That prints ' Space ' as text
I Want it to press spacebar xD
Ahh
But i want it to press Space key
i understand what you are saying
But this is an Afk bot, so by pressing space it will jump :3
J-Deezy Solved it.
Thanks man
~ Close please.