I want to know when the screensaver has kicked in on my monitor so
that I can turn off the desk light in my office.
Under XP it has worked great. I use the following to check if
screensaver is running:
'' Check if Screen Saver is Running
i = WinApi.SystemParametersInfo(114, 0, SS, 0)
'SPI_GETSCREENSAVERRUNNING
However, under VISTA, apparently the screensaver is stopped when the
monitor is powered down due to inactivity. The above call returns
false when activity is present. Shows TRUE when the screensaver kicks
on, but returns to FALSE when the monitor powers off.
Therefore, I need to know when the monitor of powered ON/OFF also. No
problem, I just used:
i = WinApi.SystemParametersInfo(84, 0, PO, 0)
'SPI_GETPOWEROFFACTIVE
However, under VISTA, this always returns FALSE no matter what.
What little I've been able to find indicates that this function does
not work under VISTA.
Does anyone have any code that I can use under VISTA and VS2005 VB to
detect when the monitored has been powered down?
tenholde