[Help]GetAsyncKeyState
I Need help with the Cross Hair Tut it says If KeyPress im trying to change it to If getAsyncKeyState (VK_F11) Turn on..
but it says VK_F11 isnt Declaired.. can someone help me.. here is the code
[php]Public Class Form1
Public Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vKey As Int32) As UShort
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Call PutWindowOnTop(Form2)
Form2.Show()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Call PutWindowOnTop(Form2)
Form2.Hide()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If GetAsyncKeyState(VK_F11) Then
Call PutWindowOnTop(Form2)
Form2.Show()
End If
End Sub
End Class[/php]
but it says VK_F11 isnt Declaired.. can someone help me.. here is the code
[php]Public Class Form1
Public Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vKey As Int32) As UShort
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Call PutWindowOnTop(Form2)
Form2.Show()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Call PutWindowOnTop(Form2)
Form2.Hide()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If GetAsyncKeyState(VK_F11) Then
Call PutWindowOnTop(Form2)
Form2.Show()
End If
End Sub
End Class[/php]


