Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Vb2008] What's the code for GetAsyncKeyState?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
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

PostPosted: Thu Feb 14, 2008 3:04 pm    Post subject: [Vb2008] What's the code for GetAsyncKeyState? Reply with quote

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.

_________________
Omg. I need something to do...

*-* My Flash Trainers *-*

*-* My Mouse Vac Tut *-*

Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Thu Feb 14, 2008 3:11 pm    Post subject: Reply with quote

Code:
<DllImport("user32.dll")> _
    Public Shared Function GetAsyncKeyState(ByVal vKey As Int32) As Short
    End Function


pinvoke.net
Back to top
View user's profile Send private message
Meeman
Advanced Cheater
Reputation: 0

Joined: 15 Nov 2007
Posts: 54

PostPosted: Thu Feb 14, 2008 3:12 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
XxOsirisxX
Grandmaster Cheater Supreme
Reputation: 0

Joined: 30 Oct 2006
Posts: 1597

PostPosted: Thu Feb 14, 2008 7:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites