473,513 Members | 2,441 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1946
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
1891
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
5237
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
46560
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
1973
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
318
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
4640
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
1828
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
5716
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
1880
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
7259
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
7158
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...
1
7098
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...
0
7523
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5085
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.