Question Process doesn't exit when application closes

bradleyd60

New member
Joined
Nov 2, 2009
Messages
4
Programming Experience
Beginner
Next issue - I published my ap, and installed it on my pc. Now, I run it and it works great, however when I close it the .exe doesn't end.... any thoughts?

Thanks again,
Bradley
 
One possible cause for this is that a form has been hidden and not closed. This can happen with both Shutdown modes; 'When startup form closes' (default) and startup form is hidden, or 'When last form closes' and any form is hidden.

Another reason could be if a new foreground thread has been started, and not stopped when application should shutdown.
 
JohnH:

Thank you for your reply.

I think you're right - as I have a log in screen that, upon correct username/pw, does a "me.hide()" and "formX.show()" function.

If I tell it to "me.close()" and "formX.show()" then it ends the whole program. I'm quite new to this - so this may be an elementary problem... I'll have to research this further. Thank you for a nudge in the right direction!
 
I think that means you have Shutdown mode 'When startup form closes' (default), and that you have set the login form as startup form. You can of course change Shutdown mode to 'When last form closes' and instead Close the login, but I would rather use a different setup. I would set the actual main form as startup form and show the login form as a dialog in the applications Startup event, where I would cancel the startup if the login fails.
The Shutdown modes is set in Application tab of project properties, the same place you can click the "View Application Events" button to access the Startup event.
 
Back
Top