| View previous topic :: View next topic |
| Author |
Message |
I'm C.H. Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Dec 2006 Posts: 1000 Location: Sweden
|
Posted: Thu Feb 14, 2008 3:04 pm Post subject: [Vb2008] What's the code for GetAsyncKeyState? |
|
|
I've Tried:
| Code: | Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If GetAsyncKeyState(vKey:=<F12></F12>) Then
Flash1.LoadMovie(0, " ")
Flash1.LoadMovie(0, "http://uploads.ungrounded.net/306000/306192_Battlefield.swf")
End If
End Sub |
It didn't work so someone please correct it. _________________
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Thu Feb 14, 2008 3:11 pm Post subject: |
|
|
| Code: | <DllImport("user32.dll")> _
Public Shared Function GetAsyncKeyState(ByVal vKey As Int32) As Short
End Function |
pinvoke.net |
|
| Back to top |
|
 |
Meeman Advanced Cheater
Reputation: 0
Joined: 15 Nov 2007 Posts: 54
|
Posted: Thu Feb 14, 2008 3:12 pm Post subject: |
|
|
yah the code should work. If not all you need to do is get user32.dll in there so if slovach's code doesnt work just get that in there _________________
I AM MEEMAN666!!!!!!!!!!
PPT277
programming languages i use: VB6, Delphi 7 , C# 2008, Python
You want to +Rep me!!!!!!! |
|
| Back to top |
|
 |
XxOsirisxX Grandmaster Cheater Supreme
Reputation: 0
Joined: 30 Oct 2006 Posts: 1597
|
Posted: Thu Feb 14, 2008 7:39 pm Post subject: |
|
|
you have to declare the API first..
| Code: | | private declare function GetAsyncKeyState lib "user32" alias "GetAsyncKeyState" (Byval vkeys as keys) as short |
Then you can use it as..
| Code: | | getasynckeystate(keys.f4) |
_________________
|
|
| Back to top |
|
 |
|