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 


How do you get keys with vb?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Jorg hi
I post too much
Reputation: 7

Joined: 24 Dec 2007
Posts: 2276
Location: Minnesota

PostPosted: Sat Jun 28, 2008 1:05 pm    Post subject: How do you get keys with vb? Reply with quote

Does anyone know how to get keys that the use types?
_________________
CEF will always stay alive.
Back to top
View user's profile Send private message
Typhoon808
Expert Cheater
Reputation: 0

Joined: 27 Mar 2008
Posts: 175
Location: Wales

PostPosted: Sat Jun 28, 2008 2:56 pm    Post subject: Reply with quote

For the active window use the KeyDown event:
Code:

Select Case e.KeyCode
Case Keys.A
'A has been pressed
Case Keys.B
'B has been pressed

'etcetera

End Select


If you want the form to be inactive (I'm guessing your program is supposed to be hidden for a specific reason) and get the keys use an API such as RegisterHotKey. Have fun with your mischievous program. Wink
Back to top
View user's profile Send private message
xX0Reaper0Xx
Advanced Cheater
Reputation: 0

Joined: 12 Jun 2007
Posts: 57

PostPosted: Sun Jun 29, 2008 12:29 am    Post subject: Reply with quote

depending what you need there is also KeyAscii Codes so that if you press A it will do something

the code is something like:


Code:
If KeyAscii = 97 Then Form2.Show


This tells the computer that if you press "a" then Get form 2 to show

in VB6 i think its typed as:

Code:
Private Sub Form1_KeyPress(KeyAscii As Integer)
If KeyAscii = 97 Then
Form2.Show
End If

_________________
Definitions:
Leecher - A Noob who steals Files and Posts it somewhere else without credits to the creator.
Noob - A higher form of being that instead of stealing Begs and asks Stupid Questions.
Flamer - Someone who has experience and totally despises noob questions and leechers.
Back to top
View user's profile Send private message MSN Messenger
Fuzz
Grandmaster Cheater
Reputation: 0

Joined: 12 Nov 2006
Posts: 531

PostPosted: Fri Jul 04, 2008 11:46 am    Post subject: Reply with quote

In vb6 just make a a module, or delcare it somewhere:

Public Declare Function coke Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer

Now, you can change coke to whatever you want, for more undetectedness (in warrock at least) otherwise keep it coke, or whatever, then on your form, create a timer, and do:

Code:
Private Sub Timer1_Timer()
If coke(vbKey[b]A[/b]) Then
Call writealong [b](normally used a different function but i'll just keep it writealong.)[/b]("Warrock", &HB34748, 1)
End If
End Sub


This would activate the hack when a is pressed. Here's another example.

Code:
Private Sub Timer11_Timer()
If coke(vbKeyInsert) Then
form2.show
form1.hide
msgbox "Form 1 is hidden, so now form2 is showing."
End If
End Sub


PM if you need help i guess.

_________________
Back to top
View user's profile Send private message AIM Address
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