473,395 Members | 2,443 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 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 1940
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: GGerard | last post by:
Using Access2000 I have an application that is running 24/7 and I would like this application to perform some routine housekeeping task at midnight. What would be an efficient way of...
14
by: Sonic | last post by:
I have an MDE file that is growing exponentially (from 3,900 KB to over 132,000 KB today). I am not saving data in this MDE, although I use a mix of offline and SQL tables for Read Only querying. ...
19
by: Frank Rizzo | last post by:
I want to log the user out when there has been a period of inactivity in the application. The key here is inactivity of the application, not the system. I know that you can retrieve the...
7
by: iwdu15 | last post by:
how can i tell if my system has gone idle? then how can i execute a command accordingly? thnks
3
by: pauld avid | last post by:
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...
3
by: jerry.ranch | last post by:
I have a simple database that is used to track experiemnts in a research lab. I make it compact and backup each night, but when users leave it open, that fails. Is there a way to set the mdb so...
7
by: Dave | last post by:
I would like to know how I go about showing a login form whenever the compuer is idle for 'x' minutes. I only know that it is going to use timers. -- L. A. Jones
1
by: Visu | last post by:
Hi All! How to find the application idle time in VB.NET windows application? We can get the windows Idle time Private Declare Function GetLastInputInfo Lib "user32.dll" But i want the...
1
by: Leo Smith | last post by:
Hello, I would like to find out if anyone has setup a page to track if a page has been idle for a set amount of time. The timer would need to reset anytime something was done on the page. I have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.