I found this tutorial on how getting Idle time of the user Idle Time.
The problem is that it will only work if the application runs on the user.
And my appli
The recommended approach for doing something like this is to have a separate application running which communicates the user session data to the service. You can configure the application at the start of the user session by adding it to the registry under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
You can read more details on this approach in the following KB Article
http://support.microsoft.com/kb/308403