From source:
In applications that use Windows Forms, unhandled exceptions in the main application thread cause the
Application.ThreadExceptionevent to be raised. If this event is handled, the default behavior is that the unhandled exception does not terminate the application, although the application is left in an unknown state. In that case, theUnhandledExceptionevent is not raised. This behavior can be changed by using the application configuration file, or by using theApplication.SetUnhandledExceptionModemethod to change the mode toUnhandledExceptionMode.ThrowExceptionbefore theThreadExceptionevent handler is hooked up. This applies only to the main application thread. TheUnhandledExceptionevent is raised for unhandled exceptions thrown in other threads.Starting with Visual Studio 2005, the Visual Basic application framework provides another event for unhandled exceptions in the main application thread -
WindowsFormsApplicationBase.UnhandledException. This event has an event arguments object with the same name as the event arguments object used by AppDomain.UnhandledException, but with different properties. In particular, this event arguments object has anExitApplicationproperty that allows the application to continue running, ignoring the unhandled exception (and leaving the application in an unknown state). In that case, the AppDomain.UnhandledException event is not raised.
Application.ThreadException can be caught and the application could continue (in general is not a great idea, but for the application like running periodically some acti