C# App exit as expected, but why Windows 7 shows "This program has stop working"
<p>I wrote a C# App. The app exit while click on the Exit button.
The app close as expected, but why Windows 7 shows "This program has stop working", and windows 7 is trying to gather error information? The exit button is purposely designed to stop the app from working.</p>

<p>anyone has any clue, thanks.</p>

<hr>

<p>-## Added Info (02 Jan 2012)<br />
Thanks guys for answering my question.
This is my situation.</p>

<p>I have totally no idea of what is happening and I don't know what information should I provide in my question.</p>

<p>But, after reading you guys feedback. I have some clue of what is happening to my C# application.</p>

<p>Answering you guys' questions:<br />
Answer 1: This is a winform.<br />
Answer 2: The Exit Code of the Exit button. I have tried 2 solutions:</p>

<p>1st:<br />
this.Close();</p>

<p>2nd:<br />
Environment.Exit(0);</p>

<p>Answer 3: I'm not sure what is defined by threads at this moment. But since I'm sure what is threads, I guess there is no threads running behind.</p>

<p>Answer 4: Yes, I do have a 3rd party customize controls added into the winform.</p>

<p>Thanks you very much for your answers.<br />
I'll start investigating the below elements for the cause of this problem. <br />
item 1: The problem might be caused by the 3rd party controls<br />
item 2: Study if there any threads running<br />
item 3: Study the eventlog to find any related information.<br /></p>

<p>Thanks again guys.</p>
