Device.CheckCooperativeLevel Method ()
Reports the current cooperative-level status of the Microsoft Direct3D device for a windowed or full-screen application.
If the device is lost but cannot be restored at the current time, Device.CheckCooperativeLevel returns the DeviceLost result code in the param_Int32R_result parameter. This is the case, for example, when a full-screen device loses focus. If an application detects a lost device, it should pause and periodically call Device.CheckCooperativeLevel until it receives a return value of DeviceNotReset. The application can then attempt to reset the device by calling Device.Reset and, if this succeeds, restore the necessary resources and resume normal operation. Note that Device.Present throws a DeviceLostException if the device is lost or not reset.
A call to CheckCooperativeLevel fails if made on a different thread than the one used to create the device being reset.