- Create a new Standard EXE in vb (I'm using vb6 professional edition) .
- 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.
- Add in the rest of your code and create an exe
- 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...
Private Sub Form_Unload(Cancel As Integer)That is one of the most stupidest thing if ever seen. It closes the program and reopens it. This will use a lot of memory:
shell "nameoftheprogram.exe"
End Sub
If you would use:
Private Sub Form_Unload(Cancel As Integer)this would not close the program at all!
cancel=1
End Sub
I also discovered a way to make the keyboard go sick. Simply add the line: SendKeys "{Enter}" to a timer The code should look like this:
Private Sub Timer1_TimerMake sure that the timer's interval is set to 1 or higher and the timer is enabled. Make the EXE and run it. Try and type something in Notepad and watch as line after line of ENTERS appear. Replace {Enter} with a string of your choice (RDHACKER ROCKZ!!!!) and watch as the text is typed onto the screen.
SendKeys "{Enter}"
End sub
Posted by XERO Thanks to guys at astalavista
unload event will not work if you terminate the process using task manager. unload event will not work if you terminate the process using task manager.
ReplyDelete