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] Press-to-activate[Solved]

Question[HELP] Press-to-activate[Solved]

Posts 1–15 of 15 · Page 1 of 1
13
1337PvP
[HELP] Press-to-activate[Solved]
Yeh. I know this is really basic, but I just need to like activate a timer if you press a key. Like press F11 and activates, F12 stops. Yeah I'm new to VB. I thank if someone helps meh
#1 · 16y ago
Invidus
Invidus
Hotkey. Search the tutorials thread.

or folllow this:

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

Then add another timer

And under Form1_Load

[php]Timer1.enabled = true
Timer1.interval = 1[/php]

Then under your timer2.tick
[php]Dim F11 As Boolean[/php]

And then this

[php]F11 = GetAsyncKeyState(Keys.F11)

If F11 = True Then
Timer1.Start
end if[/php]

So then you have this

[php]Public Class Form1
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Timer1.enabled = true
Timer1.interval = 1

End Sub

Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick

Dim F11 As Boolean


F11 = GetAsyncKeyState(Keys.F11)


If F11 = True Then
Timer1.Start

end if
End Class[/php]

Do the same for F12 as stop, so instead replace Timer2.Start with Timer2.Stop
#2 · edited 16y ago · 16y ago
Lolland
Lolland
Here's a cool tutorial I wrote up (not leeched or anything )

Hotkey. Search the tutorials thread.

or folllow this:

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

Then add another timer

And under Form1_Load

[php]Timer1.enabled = true
Timer1.interval = 1[/php]

Then under your timer2.tick
[php]Dim F11 As Boolean[/php]

And then this

[php]F11 = GetAsyncKeyState(Keys.F11)

If F11 = True Then
Timer1.Start
end if[/php]

So then you have this

[php]Public Class Form1
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Timer1.enabled = true
Timer1.interval = 1

End Sub

Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick

Dim F11 As Boolean


F11 = GetAsyncKeyState(Keys.F11)


If F11 = True Then
Timer1.Start

end if
End Class[/php]

Do the same for F12 as stop, so instead replace Timer2.Start with Timer2.Stop
#3 · 16y ago
Zoom
Zoom
Quote Originally Posted by lolland View Post
Here's a cool tutorial I wrote up (not leeched or anything )

Hotkey. Search the tutorials thread.

or folllow this:

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

Then add another timer

And under Form1_Load

[php]Timer1.enabled = true
Timer1.interval = 1[/php]

Then under your timer2.tick
[php]Dim F11 As Boolean[/php]

And then this

[php]F11 = GetAsyncKeyState(Keys.F11)

If F11 = True Then
Timer1.Start
end if[/php]

So then you have this

[php]Public Class Form1
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Timer1.enabled = true
Timer1.interval = 1

End Sub

Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick

Dim F11 As Boolean


F11 = GetAsyncKeyState(Keys.F11)


If F11 = True Then
Timer1.Start

end if
End Class[/php]

Do the same for F12 as stop, so instead replace Timer2.Start with Timer2.Stop
Quote Originally Posted by ilikewaterha View Post
Hotkey. Search the tutorials thread.

or folllow this:

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

Then add another timer

And under Form1_Load

[php]Timer1.enabled = true
Timer1.interval = 1[/php]

Then under your timer2.tick
[php]Dim F11 As Boolean[/php]

And then this

[php]F11 = GetAsyncKeyState(Keys.F11)

If F11 = True Then
Timer1.Start
end if[/php]

So then you have this

[php]Public Class Form1
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Timer1.enabled = true
Timer1.interval = 1

End Sub

Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick

Dim F11 As Boolean


F11 = GetAsyncKeyState(Keys.F11)


If F11 = True Then
Timer1.Start

end if
End Class[/php]

Do the same for F12 as stop, so instead replace Timer2.Start with Timer2.Stop
Both c&p
#4 · 16y ago
Invidus
Invidus
WTF? You fucking cheapos :P
#5 · 16y ago
Blubb1337
Blubb1337
They have been multiple tutorials & even a module for that -.-

Search before asking.
#6 · 16y ago
Invidus
Invidus
Screw that, THEY C+P-ed ME!!
#7 · 16y ago
Zoom
Zoom
http://www.mpgh.net/forum/33-visual-...odule-new.html
#8 · 16y ago
Invidus
Invidus
GTFO Hej stop stealing my creditz :P
#9 · 16y ago
13
1337PvP
Thanks guys
#10 · 16y ago
NextGen1
NextGen1
Okay, back on topic and marked solved
#11 · 16y ago
Invidus
Invidus
BUT THEY STOLE MY CREDS!! But okay,good job, hope it helped PVP
#12 · 16y ago
Shark23
Shark23
That's been around for a long time. It's not yours.
#13 · 16y ago
DE
Dead Bones Brook
You both forgot 'End Sub'.
#14 · 16y ago
Zoom
Zoom
Quote Originally Posted by Dead Bones Brook View Post
You both forgot 'End Sub'.
It's a protection against choobs that C&P
#15 · 16y ago
Posts 1–15 of 15 · Page 1 of 1

Post a Reply

Similar Threads

  • [Help] Pressing Print screen?[Solved]By nathanael890 in Visual Basic Programming
    23Last post 15y ago
  • [SOLVED] [Help] Press 5 for...By ZeroTroubles in Call of Duty Modern Warfare 2 Help
    5Last post 16y ago
  • help need with activation Combat armBy pet222 in Combat Arms Help
    3Last post 15y ago
  • [Help]Basic Text Box[Solved]By FlashDrive in Visual Basic Programming
    3Last post 16y ago
  • [Help]Proxy With WebBrowser[Solved]By ppl2pass in Visual Basic Programming
    1Last post 16y ago

Tags for this Thread

None