
Making sure VB program leaves memory when done.
Hello all.
I know this has been answered here before, but I still don't get it.
I want to make sure that when a VB4.0 16 program is shut down by the
user, it really truly goes away. I have been able to put :
Unload form1
Set form1 = nothing
End
into the Exit Click event, and the program will go away nicely.
The same code in the "terminate" event of the main form doesn't seem
to get the job done.
I don't know what to do to make sure that I properly close all the
forms and modules, etc. when the user just double clicks the little
box in the upper left hand corner (win 3.1 style) to end the program.
It seems like parts of the program remain in memory. I have a very
useable (otherwise) program that I use daily for my work, but I have
to restart windows every time I leave the program to be sure that bad
things won't happen. If I run and then exit the program three times,
I get a gpf. I also can't use any of the database files that the
program accesses until I restart windows if I exit using the upper
left box thing. If I am sure to stop the program using the Exit pull
down on the form, then it doesn't cause trouble. I'm sure this is a
dumb question, but It's escaped me. Thanks for your time in answering
this (probably for the ump{*filter*}th time!)
If it wouldn't be too much extra trouble, please e-mail your response
as well as posting to this group to be sure that I actually see it.
Thanks in advance.
Jim Harrison
Please excuse my spam retardant signature
To actually e-mail me, take out the /nospam/
(including the slashes)