Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Global Exception Handling for winforms control

When working on ASP.NET 1.1 projects I always used the Global.asax to catch all errors. I'm looking for a similar way to catch all exceptions in a Windows Forms user control, which ends up being a hosted IE control. What is the proper way to go about doing something like this?

like image 364
Alex Avatar asked Aug 05 '08 20:08

Alex


1 Answers

You need to handle the System.Windows.Forms.Application.ThreadException event for Windows Forms. This article really helped me: http://bytes.com/forum/thread236199.html.

like image 188
Chris Leon Avatar answered Sep 23 '22 12:09

Chris Leon