Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › Visual Basic Programming › [Help]Easy Global hotkeys[Solved]

Question[Help]Easy Global hotkeys[Solved]

Posts 1–8 of 8 · Page 1 of 1
jaake
jaake
[Help]Easy Global hotkeys[Solved]
Sorry this is kinda my second question in the past 2 hours......but im workin on some pretty intense stuff!!!! (but not really ^^)

anyways, i have searched google for hours and not been able to find an easy function to make global hotkeys... some of them are too long to even understand what they are, some of em dont even work....

yeahhh havent been able to find anything that is a simple to use function for global hotkeys...

creepy dancing monkeys to anyone who can help!! (most likely, nextgen will have an amazing answer, like always!! haha)
#1 · 16y ago
Blubb1337
Blubb1337
Below form1 write

Code:
Public Declare Function GetAsyncKeyState Lib "user64" (ByVal vKey As Long) As Integer
Create a timer and enable it.

On Timer1.Tick do something like..



Code:
        Dim f1 As Boolean
    
        f1 = GetAsyncKeyState(Keys.F1)

        If f1 = True Then
           'your code here
        End If
Whole code should look like this...

Code:
Public Class Form1

    Public Declare Function GetAsyncKeyState Lib "user64" (ByVal vKey As Long) As Intege

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

        Dim f1 As Boolean
     
        f1 = GetAsyncKeyState(Keys.F1)

        If f1 = True Then
            'your code here
        End If
    End Sub
End Class
#2 · 16y ago
jaake
jaake
thank you thank you

i saw one like that before but not exactly, ill try it out.

if it works, ill put you in the credits of my next release cus without you, i wouldnt have a very good program now, would i
#3 · 16y ago
Bombsaway707
Bombsaway707
Quote Originally Posted by jaake View Post
thank you thank you

i saw one like that before but not exactly, ill try it out.

if it works, ill put you in the credits of my next release cus without you, i wouldnt have a very good program now, would i
Hmm thank him? And btw the pic in ur sig has a ton of errors in the code lol

Quote Originally Posted by jaake View Post
hahaha bomb i know my sig has errors, its just random :P

and blubb, just like the other ones i tried, it considers the keys always pressed, i dont know why but it thinks they are always active
Lol and lemme give you my own hotkey code:
Code:
Private Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vKey As System.Int16) As Int16
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        If GetAsyncKeyState(Keys.F1) <> 0 Then
            MsgBox("HI")
            'code here
        End If
    End Sub
End Class
Try that code and tell me results
#4 · edited 16y ago · 16y ago
jaake
jaake
alright i will, hope this one works

____________

hahaha bomb i know my sig has errors, its just random :P

and blubb, just like the other ones i tried, it thinks the keys always pressed, i dont know why but it thinks they are always active... the boolean is false unless i press a key, but it still thinks that they are pressed...

_________________

Quote Originally Posted by bombsaway707 View Post
Lol and lemme give you my own hotkey code:
first add this under public class:
Code:
Private Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vKey As System.Int16) As Int16
then for the hotkey add(add this under a timer and enable the timer):
Code:
If GetAsyncKeyState(Keys.F1) <> 0 Then
'code here
 End If
Try that code and tell me results
WORKS LIKE A CHARM!! Thank you so much I think its because your works on 64bit (mine) and other codes only work on 32bit, cus of that int16

anyways, i will definately put you in the credits when i release it... yes its a tapper (im getting better though.. sometime soon ill release something better), and this isnt JUST a tapper, its the BEST tapper

thanks again!

EDIT: Sorry, double post :/
#5 · edited 16y ago · 16y ago
hopefordope
hopefordope
so what exactly are u makeing
#6 · 16y ago
jaake
jaake
im mostly learning VB, but im making a tapper (yes, another..) but it is the most advanced that I have ever seen on mpgh or any other site...

its almost done
#7 · 16y ago
Invidus
Invidus
AsyncKeyState is sometimes inaccurate.

Global Hotkey - VB.NET Tutorials | Dream.In.Code
#8 · 16y ago
Posts 1–8 of 8 · Page 1 of 1

Post a Reply

Similar Threads

  • [Help] Global Hotkey [Solved]By karldeovbnet in Visual Basic Programming
    6Last post 15y ago
  • [HELP][EASY]Existing files[SOLVED]By QQmoar in Visual Basic Programming
    7Last post 16y ago
  • [HELP]Hotkeys[Solved]By luckie12 in Visual Basic Programming
    3Last post 16y ago
  • [Help]64Bit Hotkeys[Solved]By xsaban13x in Visual Basic Programming
    27Last post 16y ago
  • [HELP]Hotkeys[Solved]By dylan40 in Visual Basic Programming
    16Last post 16y ago

Tags for this Thread

None