By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,317 Members | 1,297 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,317 IT Pros & Developers. It's quick & easy.

How to Check if Monitor Is Powered Down in VISTA

P: n/a
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)
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)

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?


Oct 22 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.