?
Solved

Idle after no keyboard/mouse movement

Posted on 2003-02-26
10
Medium Priority
?
769 Views
Last Modified: 2008-03-10
Hi there

How can i detect if a user is idle? When he/her hasn't touched the keyboard or mouse for X minutes. Like with the screensaver. I tried using a global hook, but theres so many problems to it.. biggest problems was that i received mouse movement messages when forms resized themself. Oh, and that when Delphi halted my app, windows halted too.

There must be some easier way?
0
Comment
Question by:skyfex
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 

Author Comment

by:skyfex
ID: 8025687
I just figured i can use getcursorpos (or whatever that function is called) every 5 seconds or so to detect mouse movement, anything like that for the keyboard?
0
 

Author Comment

by:skyfex
ID: 8025810
I just figured i can use getcursorpos (or whatever that function is called) every 5 seconds or so to detect mouse movement, anything like that for the keyboard?
0
 

Author Comment

by:skyfex
ID: 8025811
I just figured i can use getcursorpos (or whatever that function is called) every 5 seconds or so to detect mouse movement, anything like that for the keyboard?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 3

Accepted Solution

by:
gandalf_the_white earned 340 total points
ID: 8026492
what is if the user is watching a video?
you won't get any input but the user is not idle.

for hooking look at this question
http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20517847.html


there you have a keyboard and a mousehook
0
 
LVL 1

Expert Comment

by:keashF
ID: 8028372
try the application's onIdle event :

 application.OnIdle := myOnIdle;

 procedure Tform1.myOnIdle(Sender: TObject; var Done: Boolean);
 begin
    ...
 end;

cu
keashF
0
 

Author Comment

by:skyfex
ID: 8032603
Uhm keashF.. The OnIdle event tells when the application is not processing anything, not when the user is idle.
0
 
LVL 1

Expert Comment

by:keashF
ID: 8033671
ah, sorry
0
 

Expert Comment

by:CleanupPing
ID: 9317062
skyfex:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 10

Expert Comment

by:kacor
ID: 9981438
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:
       to accept gandalf_the_white's answer THE REFERENCED Q IS REALLY COMPLETE
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Some days and here is the Christmas Time. I wish good luck and good health for you all and for your loved ones

kacor
EE Cleanup Volunteer
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses
Course of the Month12 days, 14 hours left to enroll

777 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