AsyncWcfLib

WcfApplication.WinForms_ThreadException Method

Handle the UI exceptions by showing a dialog box, and asking the user whether or not they wish to abort execution. Before 'Application.Run' add the event handler for handling UI thread exceptions: Application.ThreadException += new ThreadExceptionEventHandler(WcfTrc.DefaultTracePlugin.WinForms_ThreadException); Set the unhandled exception mode to force all Windows Forms errors to go through our handler. Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);

public static void WinForms_ThreadException(
   object sender,
   ThreadExceptionEventArgs e
);

See Also

WcfApplication Class | SourceForge.AsyncWcfLib Namespace