whats wrong with my code...
I am trying to make hotkey launch what is inside each textbox but all that comes back is the time
and date they clicked the button... "1:19am 12-29-12" please help me fix this freaking weird dont know what to do.
its a little late.. so i must not be seeing something.
and date they clicked the button... "1:19am 12-29-12" please help me fix this freaking weird dont know what to do.
its a little late.. so i must not be seeing something.
Code:
Imports System****Public Class Booster
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
Private Function GetAsyncKeyState(keys As Keys) As Boolean
Throw New NotImplementedException
End Function
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs)
Timer1.enabled = True
Timer1.Interval = 1
Timer2.Enabled = True
Timer2.Interval = 1
End Sub
Private Sub AdvantiumTheme1_Click(sender As System.Object, e As System.EventArgs) Handles AdvantiumTheme1.Click
End Sub
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Close()
End Sub
Private Sub AdvantiumButton2_Click(sender As System.Object, e As System.EventArgs) Handles AdvantiumButton2.Click
If Directory.Exists("\Program Files (x86)") Then
Process.Start("run.bat")
Else
If Directory.Exists("\Program Files") Then
Process.Start("run32.bat")
End If
End If
End Sub
Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
Dim Hotkey1 As Boolean
Hotkey1 = GetAsyncKeyState(Keys.F5)
If Hotkey1 = True Then
SendKeys.Send("{Enter}")
SendKeys.Send(TextBox1.Text)
SendKeys.Send("{Enter}")
Else
Dim Hotkey2 As Boolean
Hotkey2 = GetAsyncKeyState(Keys.F6)
If Hotkey2 = True Then
SendKeys.Send("{Enter}")
SendKeys.Send(TextBox2.Text)
SendKeys.Send("{Enter}")
End If
End If
End Sub
Private Sub Timer2_Tick(sender As System.Object, e As System.EventArgs) Handles Timer2.Tick
Dim Hotkey3 As Boolean
Hotkey3 = GetAsyncKeyState(Keys.End)
If Hotkey3 = True Then
Close()
End If
End Sub
End Class

Also, the return type is not an Integer either, its a Short. You guys seriously need to look at MSDN or get proper declerations from a website like pinvoke.net: