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 › Microsoft Visual Basic(whats wrong with this??)

Microsoft Visual Basic(whats wrong with this??)

Posts 1–15 of 21 · Page 1 of 2
Noobkake
Noobkake
Microsoft Visual Basic(whats wrong with this??)
Code:
    Private Sub Hotkey_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Hotkey.Tick
        Dim Hotkey As Boolean
        Hotkey = GetAsyncKeyState(Keys.F)
        If Hotkey = True Then
            SendKeys.Send(3)
            SendKeys.Send(0)
        End If
    End Sub
End Class
everytime i do this i get the error PInvokeStackImbalance.
Anyone know what I did wrong??
#1 · edited 16y ago · 16y ago
Zoom
Zoom
Use this instead:

SendKeys.Send("3")
SendKeys.Send("0")

/Moved to VB
#2 · 16y ago
Noobkake
Noobkake
Quote Originally Posted by Zoom View Post
Use this instead:

SendKeys.Send("3")
SendKeys.Send("0")

/Moved to VB
Didnt work, its something to do with
Hotkey = GetAsyncKeyState(Keys.F)
#3 · 16y ago
Shark23
Shark23
What is your timer interval at? Set it to 1.

Try defining the hotkey as global. Sometimes it helps.


EDIT: You did start the timer didn't you?
#4 · edited 16y ago · 16y ago
Noobkake
Noobkake
Quote Originally Posted by Shark23 View Post
What is your timer interval at? Set it to 1.

Try defining the hotkey as global. Sometimes it helps.


EDIT: You did start the timer didn't you?
Yeah, It set at 1, dunno whats wrong and it is started.
#5 · 16y ago
Jason
Jason
Change your GetAsyncKeyState declaration to this

[php]
Private Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vkey As Long) As UShort
[/php]

And your code to this (not much changed, but for the sake of a control, here:

[php]
Private Sub Hotkey_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Hotkey.Tick

Dim Hotkey As Boolean = GetAsyncKeyState(Keys.F)

If Hotkey = True Then

SendKeys.Send("3")
SendKeys.Send("0")

End If

End Sub
[/php]

Let me know if that helps.
#6 · 16y ago
Shark23
Shark23
Are you trying to make it work in-game? If so then it won't work.
#7 · 16y ago
Jason
Jason
Quote Originally Posted by Shark23 View Post
Are you trying to make it work in-game? If so then it won't work.
See the first post, he's getting an error. Not that it's just not sending.
#8 · 16y ago
Zoom
Zoom
If you still get the error, please take a printscreen and post it here.
#9 · 16y ago
Noobkake
Noobkake
J-deezy, didnt work agian here is the ss:
#10 · 16y ago
Blubb1337
Blubb1337
Private Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vkey As int16) As int32
#11 · 16y ago
Dominic95
Dominic95
Private Declare Function RegisterHotKey Lib "user32" (ByVal hwnd As IntPtr, ByVal id As Integer, ByVal fsModifiers As Integer, ByVal vk As Integer) As Integer

Dim Hotkey As Boolean
Hotkey = GetAsyncKeyState(Keys.3)
#12 · 16y ago
Noobkake
Noobkake
Quote Originally Posted by Blubb1337 View Post
Private Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vkey As int16) As int32
Woah Ty, it worked!
#13 · 16y ago
Blubb1337
Blubb1337
Pleasure, it is x64 bit related :]

My code will work on both, x64/x32.
#14 · 16y ago
Noobkake
Noobkake
Now, how do it get it to work ingame :I
#15 · 16y ago
Posts 1–15 of 21 · Page 1 of 2

Post a Reply

Similar Threads

  • whats wrong with this...By NetNavi in WarRock - International Hacks
    6Last post 19y ago
  • Whats wrong with this code ?By bohnenbong in WarRock - International Hacks
    7Last post 18y ago
  • whats wrong with this?By whitten in C++/C Programming
    3Last post 17y ago
  • Whats wrong with this?By superHackz in WarRock - International Hacks
    1Last post 18y ago
  • Whats wrong with this?By superHackz in Visual Basic Programming
    1Last post 18y ago

Tags for this Thread

None