Record Monitor Event

I have an interesting task I'm attempting to accomplish. Basically I want to record when a person has physically turned off their monitor. Any ideas? Does the video card know if the monitor has been turned off? How could I potentially capture this info?

Thanks
On which OS?
Windows XP and Vista
Try to look for the WM_SYSCOMMAND message ( SC_MONITORPOWER wParam ) http://msdn.microsoft.com/en-us/library/ms646360%28VS.85%29.aspx
I'm not sure this will do the job. After reading over the documentation it doesn't seem that it captures if the user pushed the power button on the monitor. When the user pushes the power button to shut off the monitor, I want to record it in a log. Is there any other way to accomplish this?
closed account (S6k9GNh0)
Might just be me but I don't think it's possible. No scancode is sent from the monitor so it can't be caught as an event at all therefor the event will never be sent (it's seperate from the PC after all). In a laptop, the screen is usually a lot more integrated and can be accessed through certain ways therefor you can change things like brightness, hue, and even turn it on and off. On a regular PC, you can't tell the monitor to shutoff since it's completely seperate and gives no access to the monitor natively. Although I can't say if you can tell if the monitor is off from your PC. I would imagine so but I may be wrong.

I might be wrong but I did a research paper about a year and half ago on this.
closed account (1wqDSL3A)
i did this in delphi....
@ janek556 how did you accomplish it?

@computerequip: What about a device driver or something more low level? There has to be some way to capture that info. The monitors hardware knows the button has been pushed and is sending signals to shut it off. Is there really no way at all to tap into that info?
Anyone have any ideas?
closed account (z05DSL3A)
You may be able to use GetDevicePowerState().

There is also a WM_POWERBROADCAST message, that may be of use (not sure if the monitor is included in this.

Power Management:
http://msdn.microsoft.com/en-us/library/bb968807(VS.85).aspx
Last edited on
Well... it appears there is no feasible way to implement this.
closed account (S6k9GNh0)
You can't send signals to your monitor via a monitor cable. It's not possible.
Topic archived. No new replies allowed.