471,339 Members | 1,246 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,339 software developers and data experts.

access the display idle timer

I need to be know when the display goes into "suspend." It seems there is no
accurate way to query the state of the monitor so I am left with trying to
track the idleness of the system and compare that to the monitor idle time
out. There seem to be a few references on msdn documentation to system and
display idle timers but no mention of how to access them. Is there a way to
get this from the .net framework? I assume it would involve an api call. I
have been trying to use callntpowerinformation() to get the
SYSTEM_POWER_INFORMATION but with no luck. I have never used the windows API
before so any vb.net code samples using the api to get the display idel timer
would be greatly appreciated.
Jul 21 '05 #1
3 1847
Research handling the 'Microsoft.Win32.PowerModeChanged' event. This looks
like what you want, but I have no experience with it, and a quick look at the
documentation left me puzzled. Good luck.

"pauld avid" wrote:
I need to be know when the display goes into "suspend." It seems there is no
accurate way to query the state of the monitor so I am left with trying to
track the idleness of the system and compare that to the monitor idle time
out. There seem to be a few references on msdn documentation to system and
display idle timers but no mention of how to access them. Is there a way to
get this from the .net framework? I assume it would involve an api call. I
have been trying to use callntpowerinformation() to get the
SYSTEM_POWER_INFORMATION but with no luck. I have never used the windows API
before so any vb.net code samples using the api to get the display idel timer
would be greatly appreciated.

Jul 21 '05 #2
or not - sorry - i was looking at the wrong thing.

"AMercer" wrote:
Research handling the 'Microsoft.Win32.PowerModeChanged' event. This looks
like what you want, but I have no experience with it, and a quick look at the
documentation left me puzzled. Good luck.

"pauld avid" wrote:
I need to be know when the display goes into "suspend." It seems there is no
accurate way to query the state of the monitor so I am left with trying to
track the idleness of the system and compare that to the monitor idle time
out. There seem to be a few references on msdn documentation to system and
display idle timers but no mention of how to access them. Is there a way to
get this from the .net framework? I assume it would involve an api call. I
have been trying to use callntpowerinformation() to get the
SYSTEM_POWER_INFORMATION but with no luck. I have never used the windows API
before so any vb.net code samples using the api to get the display idel timer
would be greatly appreciated.

Jul 21 '05 #3
Ya, I do use the power mode change event but it does not fire when the
monitor goes into standby. Thanks though.

Paul

"AMercer" wrote:
or not - sorry - i was looking at the wrong thing.


Jul 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

19 posts views Thread by Frank Rizzo | last post: by
7 posts views Thread by iwdu15 | last post: by
3 posts views Thread by pauld avid | last post: by
7 posts views Thread by Dave | last post: by
1 post views Thread by Visu | last post: by
1 post views Thread by Leo Smith | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.