Console => Environment.Exit(0)
Forms => Form.Close()
r0ckbaer
Junior Poster in Training
55 posts since Dec 2003
Reputation Points: 13
Solved Threads: 6
r0ckbear for the forms if you put Form.Close(); you will only close the form without actually exiting the application, what i put is
Application.Exit();
Application.Exit() is indeed the method to use when you got several forms open, but when your app consists of only one MainForm and you close it, it will exit the application as well.
r0ckbaer
Junior Poster in Training
55 posts since Dec 2003
Reputation Points: 13
Solved Threads: 6
i cant exit the application using Application.Exit()
serkan sendur
Postaholic
2,062 posts since Jan 2008
Reputation Points: 854
Solved Threads: 127
Please start new threads for your questions.
You probably have another thread created that is not running as a background thread which will stop your application from closing until the thread aborts. You probably need to review if this is this case, or upload your project demonstrating the behavior.
Please do not respond to this thread -- create a new one.
sknake
Industrious Poster
4,954 posts since Feb 2009
Reputation Points: 1,764
Solved Threads: 735
Friends!
Please do not resurrect threads that are years old. By doing so you run the risk of confusing current posters. If you have any questions please ask. You are welcome to start your own threads. Have a look at forum rules .
Thread Locked.
__avd
Posting Genius (adatapost)
8,648 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241