472,110 Members | 2,297 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,110 software developers and data experts.

Exiting an Application in VB.net

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
Nov 20 '05 #1
2 10477
Hello,

"tt" <t@t.com> schrieb:
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.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #2
"tt" <t@t.com> schrieb
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.
--
Armin
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Andrew Warren | last post: by
2 posts views Thread by pnp | last post: by
3 posts views Thread by Bonj | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.