473,587 Members | 2,490 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 callntpowerinfo rmation() to get the
SYSTEM_POWER_IN FORMATION 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 1961
Research handling the 'Microsoft.Win3 2.PowerModeChan ged' 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 callntpowerinfo rmation() to get the
SYSTEM_POWER_IN FORMATION 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.Win3 2.PowerModeChan ged' 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 callntpowerinfo rmation() to get the
SYSTEM_POWER_IN FORMATION 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
1894
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 doing this; of detecting when midnight
14
5248
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. I also have many forms and some reports and queries. Many people use this DB on a daily basis and there is constantly someone in it, virtually...
19
46603
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 inactivity of the system via GetLastInputInfo. That's not what I want - I want inactivity of the application. Thanks.
7
1976
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 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...
3
4648
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 that if there is no user input for say 30 minutes, it shuts itself down? Do I write an on timer procedure that resets a counter when the main...
7
1831
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
5737
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 idle time of my application alone in VB.NET.
1
1890
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 done this kind of thing with a windows application by watching the idle event, and by monitoring the root message loop. I am not as familar with the...
0
7923
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8216
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8221
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5719
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5395
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1192
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.