2

I am using task scheduler to fire a program when someone logs in, unlocks the station, and I would like to do it when the screen turns back on prior to locking. IE the power savings turns off the screen at 5 minutes, lock happens at 15 minutes.

Which event would I register to capture the screen coming back on?

1 Answer 1

0

GetDevicePowerState sometimes works for monitors. If it's present, you can open the \.\LCD device. Close it immediately after you've finished with it.

Essentially, you're out of luck -- there is no reliable way to detect the monitor power state, short of writing a device driver and filtering all of the power IRPs up and down the display driver chain. And that's not very reliable either.

From a StackOverflow post found here.

2
  • Thanks, I guess i'll have it lock the screen on power off which will force a login prompt and get the same results, thanks. Commented Dec 5, 2013 at 19:47
  • Not sure if you followed the link, but there are some other answers and comments that might be useful.
    – Keltari
    Commented Dec 5, 2013 at 20:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .