If you have the energy saving features for a monitor turned on under Display properties, is there anyway of detecting when the monitor is powered down? and then told to wake up?
thanks
Das Shrubber
Printable View
If you have the energy saving features for a monitor turned on under Display properties, is there anyway of detecting when the monitor is powered down? and then told to wake up?
thanks
Das Shrubber
Hello!
A few days ago I wanted to make such a program,
which turns the PC into Stand-by mode, and leave this automatically.
But I found out that any progress, even Timer events, is stopped during this mode.
Maybe there is a way to check this mode, but I don't think so.
Using the SystemParametersInfo Function, you can get wether the screensaver is on, wether powersave(montior) is enabled, and what the powersave timeout is. use these Flags(from msdn):
they are not exactly what you want, but they might helpQuote:
SPI_GETPOWEROFFACTIVE Determines whether the power-off phase of screen saving is enabled. The pvParam parameter must point to a BOOL variable that receives TRUE if enabled, or FALSE if disabled.
Windows 98: This flag is supported for 16-bit and 32-bit applications.
Windows 95: This flag is supported for 16-bit applications only.
Windows NT: This flag is supported for 32-bit applications on Windows NT versions 5.0 and later. It is not supported for 16-bit applications.
SPI_GETPOWEROFFTIMEOUT Retrieves the time-out value for the power-off phase of screen saving. The pvParam parameter must point to an integer variable that receives the value.
Windows 98: This flag is supported for 16-bit and 32-bit applications.
Windows 95: This flag is supported for 16-bit applications only.
Windows NT: This flag is supported for 32-bit applications on Windows NT versions 5.0 and later. It is not supported for 16-bit applications.
SPI_GETSCREENSAVEACTIVE Determines whether screen saving is enabled. The pvParam parameter must point to a BOOL variable that receives TRUE if screen saving is enabled, or FALSE otherwise.
SPI_GETSCREENSAVERRUNNING Windows NT 5.0 and later, Windows 98: Determines whether a screen saver is currently running on the window station of the calling process. The pvParam parameter must point to a BOOL variable that receives TRUE if a screen saver is currently running, or FALSE otherwise. Note that only the interactive window station, "WinSta0", can have a screen saver running.
SPI_GETSCREENSAVETIMEOUT Retrieves the screen saver time-out value, in seconds. The pvParam parameter must point to an integer variable that receives the value.