• Welcome to Valhalla Legends Archive.
 

Problem

Started by David, March 26, 2004, 11:59 AM

Previous topic - Next topic

David

I run my bot, and when i exit it, i ctrl + alt + del , and then the bot is still in there....how do i fix  this?
Quote from: l]ante on March 15, 2004, 11:40 AM
You learned 8 languages in 8 months?
Geez, go code a life.

Networks

Private Sub Form_Unload
Unload Me
End
End sub

*Make sure you unload the rest of the forms you: Unload FrmExample


Dyndrilliac

End is a catch-all for any forms still running. Just make End on whatever procedure you want the program to close on.
Quote from: Edsger W. DijkstraIt is practically impossible to teach good programming to students that have had a prior exposure to BASIC; as potential programmers they are mentally mutilated beyond hope of regeneration.

Spht

#3
Quote from: Networks on March 26, 2004, 12:07 PM
Private Sub Form_Unload
Unload Me
End
End sub

*Make sure you unload the rest of the forms you: Unload FrmExample



Note that Unload <object> is what triggers Form_Unload, so calling it again is redundant. Avoid using End since it kills process without cleaning up any used memory. On unload, you should free all the memory you were using up by unloading any other forms which are running, clear arrays, terminate classes (VB may handle this automatically for you, not sure off hand), etcetera.