อ่านในภาษาอังกฤษ แก้ไข

แชร์ผ่าน


WindowsFormsApplicationBase.OnUnhandledException Method

Definition

When overridden in a derived class, allows for code to run when an unhandled exception occurs in the application.

C#
protected virtual bool OnUnhandledException(Microsoft.VisualBasic.ApplicationServices.UnhandledExceptionEventArgs e);

Parameters

e
UnhandledExceptionEventArgs

The data for the event.

Returns

A Boolean that indicates whether the UnhandledException event was raised.

Remarks

By default, this method raises the UnhandledException event as long as a debugger is not attached and the user is handling the UnhandledException event. The event handler can set the ExitApplication property. If ExitApplication is False, or if the event is not handled, the application exits upon return from the exception handler. Otherwise, control of the application is returned to the Windows Forms message loop.

Applies to

ผลิตภัณฑ์ เวอร์ชัน
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 5, 6, 7, 8, 9, 10

See also