469,643 Members | 1,427 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,643 developers. It's quick & easy.

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 10356
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
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.