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 › Code to close Program?

ArrowCode to close Program?

Posts 1–12 of 12 · Page 1 of 1
Katie_Perry
Katie_Perry
Code to close Program?
Hey all Coding/making programs Nerds!

Ok, lets say i put a button in, and it's name (NOT text) is: Button1.

I jsut want to know the code like you click it and the program closes! It is simple, but i am crap =)

Thanks

[Visual basics Microsoft 2008 Express Edition™]
#1 · 16y ago
Heroblind
Heroblind
Quote Originally Posted by Yuerno View Post
Hey all Coding/making programs Nerds!

Ok, lets say i put a button in, and it's name (NOT text) is: Button1.

I jsut want to know the code like you click it and the program closes! It is simple, but i am crap =)

Thanks

[Visual basics Microsoft 2008 Express Edition™]
Here you go:
Code:
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
        End
End Sub
#2 · 16y ago
IA
Iamazn
Quote Originally Posted by Heroblind View Post
Here you go:
Code:
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
        End
End Sub
I heard that End Is a horrible way to close the app.
You can try
Me.Close()
#3 · 16y ago
MO
monkey32
Yeah. "Me.close" is how you do it. Double click the button then it'll bring you to the code. Just type. Me.close
#4 · 16y ago
Jimmy
Jimmy
msgbox ("Thanks For Using My Device")
me.close ()
#5 · 16y ago
K4GE
K4GE
Use:
Code:
Application.Exit()
Its the easiest way to close a program.
#6 · 16y ago
gwentravolta
gwentravolta
Here is a more detailed answer:

Me.Close() will just close the form you clicked X on (might be the whole application if it's only one form.

Close() will close the whole application.

Application.Exit() will close the whole application as well. The Application. class(?) has alot of options though, like Application.Restart(), etc.
#7 · 16y ago
Katie_Perry
Katie_Perry
Quote Originally Posted by jimmydang09 View Post
msgbox ("Thanks For Using My Device")
me.close ()
I meant the click the button and the whole program closes.

Hold on, i will try HeroBlind's way.


Edit*: Thanks Jimmy anyway, soemthing else i learnt
#8 · edited 16y ago · 16y ago
LE
LegendaryAbbo
The two ways to close the whole application (all forms)

vb2008
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1Click
Close() 
End Sub
vb6.0
Code:
Private Sub Command1_Click()
End
End Sub

Edit: I think you got answered never mind
#9 · 16y ago
Katie_Perry
Katie_Perry
Aaa, legendaryhack, the first one is what i needed
#10 · 16y ago
Pixie
Pixie
Or be sneaky (a keylogger) with Me.Hide()
#11 · 16y ago
Katie_Perry
Katie_Perry
I don't want to be bad Pixie!

hahaha =D

(Alt__Tank! Grrr)
#12 · 16y ago
Posts 1–12 of 12 · Page 1 of 1

Post a Reply

Similar Threads

  • close programBy mopo in Visual Basic Programming
    11Last post 18y ago
  • promo code contest closed atmBy Microshit in WarRock Discussions
    5Last post 15y ago
  • Smart Close Program - For ErrorsBy Obey in WarRock - International Hacks
    19Last post 17y ago
  • debugger and closing programsBy Dimedrol1536 in Piercing Blow Hack Coding/Source Code
    1Last post 15y ago
  • Looking for code for "close on inject" function.By Lezzy in Combat Arms Coding Help & Discussion
    11Last post 15y ago

Tags for this Thread

#close#code#program