Jump to content
Sub_Zero

VB code that would prevent you from shutting down a VB app

Recommended Posts

By David Gray - chapter16_98@hotmail.com

I was bored, so I decided to write a VB code that would prevent you from

shutting down a VB app. It has worked in most of my tests, but has failed

sometimes. It involves shelling the app once it has been closed down:

1) Create a new Standard EXE in vb (I'm using vb6 professional edition)

2) Copy this and paste it into the form that you want to keep open (i.e

Form1) you can change this to suit your needs

Private Sub Form_Unload(Cancel As Integer)

Shell app.path & "" & app.exename

End Sub

You can also use:

Private Sub Form_Unload

to initialize the code when you shutdown.

3) Add in the rest of your code and create an exe

4) Run the program and press CTRL+ALT+DEL Close the program and watch as

it springs back into life!! There are ways around it, but computer idiots

will not be able to close it...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...