Hi,
My C# application trys to access directorycontext 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:
http://msdn2.microsoft.com/en-us/lib...exception.aspx
But I'm getting compiling message:
The name ErrorhandlerFrom 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.ThreadException += new
ThreadExceptionEventHandler(ErrorHandlerForm.Form1 _UIThreadException);
How to address that? What is ErrorHandlerForm?
I can't find answer to the ErrorHandlerForm 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.