Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 627
  • Last Modified:

Monitor PC activity

I am developing an application that monitor activities on XP/win2k machine. It is a simple application that calculates total idle time and active time and produces a report daily. The machine is considered idle if there's no keyboard or mouse movement.

What's the best way to do the above ? I am trying a method that detects keyboard and mouse activities,  basically capturing windows event such as WM_KEYUP, WM_LBUTTONDBLCLK, etc.. My question is how reliable this method is ? I am using SetWindowsHookEx API call to intercept the windows messages.

1 Solution
Capturing such activities from all applications is always made with hooks. So you went the right way. Now the only thing you need to refine is what events you want to capture. Maybe you will need WM_KEYDOWN, WM_LBUTTONDOWN, WM_RBUTTONDOWN, WM_MOUSEWHEEL because with the events you showed, you will only capture double clicks from the left button, nothing from the right button, nothing from the mouse wheel.
this example may help you for a start
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

MyQ2004Author Commented:
How do I use performance data to check if the user actually used the keyboard or mouse ?
Glad to help
Thanx for accepting
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now