Results 1 to 14 of 14
  1. #1
    iownageXD's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Location
    Australia
    Posts
    1,231
    Reputation
    61
    Thanks
    179
    My Mood
    Angelic

    [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.

  2. #2
    No5cope's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Posts
    1,902
    Reputation
    26
    Thanks
    678
    My Mood
    Aggressive
    does this work in combat arms??? cause i need one to work for my bunny hopper

  3. #3
    LegendaryAbbo's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Posts
    5,243
    Reputation
    23
    Thanks
    546
    My Mood
    Relaxed
    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 liquidforce 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.

  4. #4
    CodeHPro's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    116
    Reputation
    10
    Thanks
    76
    My Mood
    Aggressive
    this is the worst way to do hotkeys

  5. #5
    maarten551's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Posts
    255
    Reputation
    10
    Thanks
    75
    My Mood
    Mellow
    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

  6. #6
    CodeHPro's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    116
    Reputation
    10
    Thanks
    76
    My Mood
    Aggressive
    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

  7. #7
    iownageXD's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Location
    Australia
    Posts
    1,231
    Reputation
    61
    Thanks
    179
    My Mood
    Angelic
    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

  8. #8
    ac1d_buRn's Avatar
    Join Date
    Aug 2009
    Gender
    female
    Location
    CA Source Section
    Posts
    3,404
    Reputation
    157
    Thanks
    4,003
    My Mood
    Flirty
    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.

  9. #9
    iownageXD's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Location
    Australia
    Posts
    1,231
    Reputation
    61
    Thanks
    179
    My Mood
    Angelic
    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.

  10. #10
    ac1d_buRn's Avatar
    Join Date
    Aug 2009
    Gender
    female
    Location
    CA Source Section
    Posts
    3,404
    Reputation
    157
    Thanks
    4,003
    My Mood
    Flirty
    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

  11. #11
    trevor206's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Posts
    324
    Reputation
    12
    Thanks
    107
    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 https://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.
    Last edited by trevor206; 10-08-2009 at 04:46 PM.

  12. #12
    ac1d_buRn's Avatar
    Join Date
    Aug 2009
    Gender
    female
    Location
    CA Source Section
    Posts
    3,404
    Reputation
    157
    Thanks
    4,003
    My Mood
    Flirty
    Quote Originally Posted by trevor206 View Post
    try to go and watch this https://www.mpgh.net/forum/33-visual-...albasic08.html its a video tut on them
    ive lookied at that vid v4 but when i release the hotkey the program stops.
    How do i make it stay on?

  13. #13
    KallOfKolby's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    22
    Reputation
    10
    Thanks
    4
    My Mood
    Tired
    Wow I have been looking for this for like an hour!

    And guess what IT STILL DOESN'T"T WORK!
    Thanks anyway dude.

  14. #14
    maarten551's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Posts
    255
    Reputation
    10
    Thanks
    75
    My Mood
    Mellow
    it works i use it to and i like it alot :P

Similar Threads

  1. [TUT] Hotkeys VB 2008/2010
    By Zoom in forum Programming Tutorials
    Replies: 12
    Last Post: 12-08-2010, 07:19 PM
  2. [Tut] Hotkeys
    By LightzOut in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 16
    Last Post: 07-28-2010, 05:01 PM
  3. [TuT]Hotkeys with 1 Letter
    By Invidus in forum Visual Basic Programming
    Replies: 22
    Last Post: 03-31-2010, 07:44 PM
  4. [Video TUT]How to make hotkeys in visualbasic08
    By trevor206 in forum Visual Basic Programming
    Replies: 7
    Last Post: 10-10-2009, 03:08 PM
  5. [TuT]Very Basic Hotkeys
    By Iamazn in forum Visual Basic Programming
    Replies: 4
    Last Post: 09-07-2009, 12:18 PM

Tags for this Thread