[DllImport("coredll.dll", SetLastError=true)]
private static extern int SetDevicePower(
string pvDevice,
int dwDeviceFlags,
DevicePowerState DeviceState);
<DllImport("coredll")> _
Private Shared Function SetDevicePower(ByVal pvDevice As String, ByVal dwDeviceFlags As Integer, ByVal DeviceState As DevicePowerState) As Integer
End Function
public enum DevicePowerState : int
{
Unspecified = -1,
D0 = 0, // Full On: full power, full functionality
D1, // Low Power On: fully functional at low power/performance
D2, // Standby: partially powered with automatic wake
D3, // Sleep: partially powered with device initiated wake
D4, // Off: unpowered
}
private const int POWER_NAME = 0x00000001;
None.
Please add some!
This turns the backlight off
SetDevicePower("BKL1:", POWER_NAME, DevicePowerState.D4);
This holds the backlight on until the device turns off
SetDevicePower("BKL1:", POWER_NAME, DevicePowerState.D0);
Do you know one? Please contribute it!