[TuT] Hotkeys - VB 08

Posts 1–14 of 14 · Page 1 of 1
[TuT] Hotkeys - VB 08
Alright, you need to ATLEAST know the basics for this.
At the top, after Public Class Form# Add in this code:

Code:
Public Declare Function GetAsyncKeyState Lib "User32" (ByVal vKey As Long) As Integer
or this one if that doesn't work for you:

Code:
Public Declare Function GetAsyncKeyState Lib "User64" (ByVal vKey As Long) As Integer
Now in a timer, add this:
Code:
Dim Hotkey1 As Boolean
        Hotkey1 = GetAsyncKeyState(Keys.ReplaceThisWithHotKey)
        If Hotkey1 = True Then
            Timer1.Enabled = True
        End If
To explain the timer, so you can edit this code for your own hotkey..
Hotkey1 = String, so you can rename to whatever you want.
ReplaceThisWithHotKey = Replacing the word with the hotkey you want, VB 08 has auto complete for hotkeys.
Timer1.Enabled = True = The action it does if you press the hotkey.

Edit: Also, double click on your form and write in Timer#.Enabled = True - then replace # with whatever number timer you have.
does this work in combat arms??? cause i need one to work for my bunny hopper
you do it the complicated way... you can do it in less lines and easier.

I'll show you when I install vb08 just to make sure I get it right, (im 100% certain for vb6.0 but only about 80% for 08 :P)

Quote Originally Posted by No5cope View Post
does this work in combat arms??? cause i need one to work for my bunny hopper
This is saying if you press this make this happen, not saying press this key for me.
this is the worst way to do hotkeys
not really because you can use this even if you not have your program selected

it works in-game for me :P

i don't know if it works in combat arms
Quote Originally Posted by maarten551 View Post
not really because you can use this even if you not have your program selected

it works in-game for me :P

i don't know if it works in combat arms
ya im a noob and didnt no that lol no im not a noob useing a timer for hotkeys is just really dumb you can pres the hotkey 1 time and then it could send 10 commands to your whatever you calling
Quote Originally Posted by CodeHPro View Post
ya im a noob and didnt no that lol no im not a noob useing a timer for hotkeys is just really dumb you can pres the hotkey 1 time and then it could send 10 commands to your whatever you calling
wdf? that's what hotkeys are supposed to do.. send commands, but you get to choose the commands o.O If you put down 1 comamnd it's not sending it 10 times - You could put that into form_load if you want, it's faster but makes you pressing buttons lag
How does this hotkey work?
Press it and it program goes, Release it and it stops?

Or press it and it goes even when u let go of the hotkey?
Because i found a tut liek this and when i did it that way it only worked when i was pressing the hotkeys.
press and when you let go it'll still stay on.
if you guys know more vb you'll know how to make a code that turns itoff.
Quote Originally Posted by iownageXD View Post
press and when you let go it'll still stay on.
if you guys know more vb you'll know how to make a code that turns itoff.
Im confused =="
I write all that in but how do i get the hotkey to actually start me program?
Is there any additional code i need to write in to make it start?

acid_buRn
Quote Originally Posted by ac1d_buRn View Post
Im confused =="
I write all that in but how do i get the hotkey to actually start me program?
Is there any additional code i need to write in to make it start?

acid_buRn
try to go and watch this http://www.mpgh.net/forum/33-visual-...albasic08.html its a video tut on them
*edit
i don't think you can keep it on without holding it im pretty sure its a hold hotkey.
Wow I have been looking for this for like an hour!

And guess what IT STILL DOESN'T"T WORK!
Thanks anyway dude.
it works i use it to and i like it alot :P
Posts 1–14 of 14 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

Talk with us