-
how do i kill a program when the user has finished using it.
i have a button exit program, which has unload me
but when i install the program on my computer and then run it, i still have the program running in the background, the only way to kill it is ctrl alt and del and then shut the program from there
-
That's not normal. Do u use any automation in ur project? Sometimes processes created from within ur application do not stop the running app. Check to see all objects or processes are destroyed before u unload the app.
-
If you have a hidden form somewhere it will also keep your program running...
Basically anything that can receive events from the OS will keep it running, except for a code-only timer and the likes, they will crash it when your programs stops without killing the timer, but that's off-topic.
Gerco.
-
Me is a vb keyword to reference the current form.
So using unload me isn't exiting any add-ins, modules etc, just the current form.
For a 1 form program :
Code:
Unload me
Set me = nothing
End
For all other programs :
Code:
Dim Frm as form
For each Frm In forms
Unload Frm
Set Frm = nothing
Next Frm
End
See this tip too ... http://www.vb-world.net/tips/tip53.html