Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Application keeps running in the background

Status
Not open for further replies.

GMcFly

Programmer
Oct 2, 2002
48
NL
Hi everybody,

I've got a problem. When I quit my application (using a button giving the command "End") all the forms dissapear but when I look in the task manager, the application is still running. Is there another way to stop my application from running. Can I do a "force quit"? Thanks for your help
 
You are using End? You shouldn't do that. Unload the form(s) and set any objects to 0 return memory to the OS.

Are you using a timer? If you don't disable the timer before you unload the form it can fire and reload the form.
 
Ok, thanks for you help. But it still doesn't work. Here is the code I have now on the click event of the button:
Code:
    Dim F As Form
    For Each F In Forms
        Unload F
    Next
 
Are you running this from inside a form? If so the code attempts to continue at the Next, thus reloading the form it's running in. Try

Dim F As Form
For Each F In Forms
If F.Name <> Me.Name Then Unload F
Next F
Unload Me


Andy
&quot;Logic is invincible because in order to combat logic it is necessary to use logic.&quot; -- Pierre Boutroux
&quot;Why does my program keep showing error messages every time something goes wrong?&quot;
 
That also doesn't work. There might be something wrong in my application. I'm uploading and downloading files, but I've done it in such a way that it can only quit when the upload is done. If there is no other way of quiting the application, it is probably my application. Thanks again for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top