Solved

C# Winform Application Exit

Posted on 2007-03-23
2
2,162 Views
Last Modified: 2011-10-03
When I hit close(X)  on  my Winform my application still doesnt exit from memory. I still see it in the Task Manager. I want to exit the application.    

Is there any event of the Form which fires when I click close(X) and I can manually do an Application.Exit() in that method
0
Comment
Question by:AdibRahman77
2 Comments
 
LVL 2

Accepted Solution

by:
khoama earned 175 total points
ID: 18782606
I do not remember it exactly ( onClose ). Just switch to the Events window of the form designer.
0
 
LVL 85

Expert Comment

by:Mike Tomlinson
ID: 18782680
Do you have any threads running in the app?  If so, either terminate or set the IsBackground() property on them to True.

Also, infinite loops will keep the app from exiting.

What does your app do?
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question