Application has stopped responding
-
Hello, I am receiving an "Application has stopped working" error in my C# WinForms application. The running OS versions are Windows 7 Home Premium, Windows 7 Professional and also a few WinXP Home machines. I have an exception handler set up in my code: public void MyExceptionHandler (Object sender, ThreadExceptionEventArgs e) { MessageBox.Show("Internal Error" + "\r\n\r\n" + e.Exception.Message + "\r\n\r\n" + "Stack Trace: " + e.Exception.StackTrace, "Oslermedicine® Manager Notification"); } This code is never called for some reason and Windows handles any errors. I set up the ThreadException in my _load event for the main form: Application.ThreadException += MyExceptionHandler; What would cause this behavior? I tried to put it in the main loop but then the program becomes very unstable, crashing on other handlers. Thanks Mike
-
Hello, I am receiving an "Application has stopped working" error in my C# WinForms application. The running OS versions are Windows 7 Home Premium, Windows 7 Professional and also a few WinXP Home machines. I have an exception handler set up in my code: public void MyExceptionHandler (Object sender, ThreadExceptionEventArgs e) { MessageBox.Show("Internal Error" + "\r\n\r\n" + e.Exception.Message + "\r\n\r\n" + "Stack Trace: " + e.Exception.StackTrace, "Oslermedicine® Manager Notification"); } This code is never called for some reason and Windows handles any errors. I set up the ThreadException in my _load event for the main form: Application.ThreadException += MyExceptionHandler; What would cause this behavior? I tried to put it in the main loop but then the program becomes very unstable, crashing on other handlers. Thanks Mike
There is also an "UnhandledException" delegate in the Application class that you should assign your handler to.
The difficult we do right away... ...the impossible takes slightly longer.