Hi Everyone,

In asp.net you have the Global.asax file that allows you to handle and exceptions
that have slipped through the net in your code. It also allows you to handle
application level events in a central place.

Is there a similar mechanism for dealing with global events and exceptions
in Windows Forms applications?

If not, what would be the best approach to make sure that any erstwhile unhandled
exceptions are caught and dealt with graciously?

Thanks to anyone who can help

Kind regards

tce

Re: Application Level Events by Rodger

Rodger
Sat Mar 12 12:34:17 CST 2005

Hi,

The System.Windows.Forms.Application class provides an event called
ThreadException that occurs when an untrapped thread exception is thrown.

I use this event to trap unhandled exceptions in my application and display a
message to the user.

--
Rodger Constandse

<http://www.SequenceDiagramEditor.com>
Sequence Diagram Editor - A quick and easy way to draw and edit sequence diagrams

thechaosengine wrote:

> Hi Everyone,
>
> In asp.net you have the Global.asax file that allows you to handle and
> exceptions that have slipped through the net in your code. It also
> allows you to handle application level events in a central place.
>
> Is there a similar mechanism for dealing with global events and
> exceptions in Windows Forms applications?
> If not, what would be the best approach to make sure that any erstwhile
> unhandled exceptions are caught and dealt with graciously?
>
> Thanks to anyone who can help
>
> Kind regards
>
> tce
>