Solved

Check if computer idle

Posted on 2000-05-12
4
358 Views
Last Modified: 2008-03-06
How do I check how long the computer is idle using vb6. I'm sure its some api call could anyone give me a short code example?? Thanks.
0
Comment
Question by:Eamon
4 Comments
 
LVL 1

Expert Comment

by:ofirg
ID: 2803974
Public Declare Function GetTickCount Lib "kernel32" Alias "GetTickCount" () As Long
0
 
LVL 4

Expert Comment

by:PBuck
ID: 2804866
GetTickCount is superb for a counter solution, but I am not sure that is what Eamon is looking for.

Do you want to know how long the computer has not been running any executables?  For instance, when you run Wintop (from the Kernal toys) - you can see what processes are using CPU time.  
0
 
LVL 28

Accepted Solution

by:
AzraSound earned 50 total points
ID: 2865093
you would have to look for input through keyboard and mouse...whenever either of these fire an event you would reset your timer that is calculating how long the system has been idle
0
 
LVL 1

Author Comment

by:Eamon
ID: 2866826
Comment accepted as answer
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now