I have a desktop application in which I would like to know two things:
- Is the user currently on the PC (more specifically, is he giving any input to the PC), so I can change his state to "away" if needed; and
- Is the screensaver running right now, so I can perform more CPU intensive work during that time.
I'm using C#/.NET. How would you suggest to tackle these two tasks?
NOTE: WIN32 invocation will be just as good, as well as any unmanaged code solution.