Exiting an Application in VB.net

  • Thread starter Thread starter tt
  • Start date Start date
T

tt

Hi,
ANy ideas on this? When I click the close button of a
window in VB.net which method gets called?

I used Applicaton.exit in some method of my appln. to
exit the application but, it still leaves the process in
the process table. Can someone help me exiting an
application cleanly.
Thanks
-tt
 
Hello,

tt said:
ANy ideas on this? When I click the close button of a
window in VB.net which method gets called?

The handler for the form's 'Closing' event.
 
tt said:
Hi,
ANy ideas on this? When I click the close button of a
window in VB.net which method gets called?

I used Applicaton.exit in some method of my appln. to
exit the application but, it still leaves the process in
the process table. Can someone help me exiting an
application cleanly.
Thanks
-tt

To exit the app, all threads must be exited. Do you have multiple threads? A
UI thread exits when you exit the message loop. If you've passed a Form to
Application.Run you must close the Form to exit Application.Run. If you
didn't passed a Form, call Application.ExitThred (not Exit).

If you can reproduce the problem in the IDE, go into break mode, look at the
threads window and the callstack.
 
Back
Top