Hi,
My C# application trys to access directorycontex t during Form loading. Try
and Catch if there is an exception. I then output an error message and then
"this.Close ();" to exit the application. But, as my applicaiton closes, the
MS dialog comes up asking to send Error Report to MS.
I tried using ThreadException event code from:
But I'm getting compiling message:
The name ErrorhandlerFro m does not exist in the current context.
This is from the line of code:
// Add the event handler for handling UI thread exceptions to the event.
Application.Thr eadException += new
ThreadException EventHandler(Er rorHandlerForm. Form1_UIThreadE xception);
How to address that? What is ErrorHandlerFor m?
I can't find answer to the ErrorHandlerFor m so I tried commenting that line
out and I put a try catch around my code(including Application.Run ) in
program.cs. Now the MS Error Report dialog does't come up. Why is that so?
And also, is it OK to put a try-catch around Application.Run ? Thank you.
--
Thanks.
My C# application trys to access directorycontex t during Form loading. Try
and Catch if there is an exception. I then output an error message and then
"this.Close ();" to exit the application. But, as my applicaiton closes, the
MS dialog comes up asking to send Error Report to MS.
I tried using ThreadException event code from:
But I'm getting compiling message:
The name ErrorhandlerFro m does not exist in the current context.
This is from the line of code:
// Add the event handler for handling UI thread exceptions to the event.
Application.Thr eadException += new
ThreadException EventHandler(Er rorHandlerForm. Form1_UIThreadE xception);
How to address that? What is ErrorHandlerFor m?
I can't find answer to the ErrorHandlerFor m so I tried commenting that line
out and I put a try catch around my code(including Application.Run ) in
program.cs. Now the MS Error Report dialog does't come up. Why is that so?
And also, is it OK to put a try-catch around Application.Run ? Thank you.
--
Thanks.