Click here to Skip to main content
15,917,481 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi,

I have a requirement to show alert window, if user continuously using the system for 30/60 min, Can any one please suggest, how I can proceed?

Ideas I got are, thought of using system idle process but, system will not be idle if any background(outlook) applications are running.

What I am thinking is finding out of last key press or mouse.What do you suggest?

Appreciate and thanks in advance.

Many Thanks,
Hari
Posted
Comments
Sergey Alexandrovich Kryukov 14-Jul-12 22:44pm    
Motivation of this requirement, please. How "using the system" is defined? What does it have to do with "outlook"?
--SA

1 solution

If you need to record the time of last user input (mouse/keyboard), you can use Windows Hooks. The problem is: it cannot be do purely with C#, because, according Microsoft documentation, setting up a global hook should be done is a separate unmanaged DLL. (If you need to call set up a hook only for a current application process, you can do it in your C# project using P/Invoke, but this is not your case: you need a system-global hook.)

Please see my comment to the question. I still want to know the motivation of requirement.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900