Hello
Is any way to detect if a monitor is currently powered on/off or in standby?
Thank yoU!
Detecting if the monitor is powered off
Re: Detecting if the monitor is powered off
After some digging about GetDevicePowerState I found a little code in the old forums about it:
Code: Select all
hDisp := DllCall("CreateFile","Str","\\.\LCD","Uint",0xC0000000,"Uint",0x3,"Uint",0,"Uint",0x3,"Uint",0,"Uint",0)
DllCall("GetDevicePowerState", "UInt", hDisp, "IntP", stat)
About the last link you posted I have to compile it with visual studio?
Thanks!
Re: Detecting if the monitor is powered off
msdn wrote:GetDevicePowerState function
Retrieves the current power state of the specified device. This function cannot be used to query the power state of a display device.
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile