Share via


Device.DeviceLost Event (Microsoft.DirectX.Direct3D)

Occurs when a device is about to be lost (for example, immediately prior to a reset).

Definition

Visual Basic Public Event DeviceLost As EventHandlerLeave Site
C# public event EventHandlerLeave Site DeviceLost;
C++ public:
event EventHandlerLeave SiteDeviceLost;
JScript In JScript, you can use events, but you cannot define your own.

Remarks

To add an event handler that listens for a Device.DeviceLost event, use the following C# code.

[C#]device.DeviceLost += new System.EventHandler(this.DeviceLostEventHandler);