IdleTimer to have MSN like behaviour in your application
I've just created a little nice class that helps in building applications that need MSN like behaviour regarding detecting a users idle time. This can be very handy when your application notifies the user for some special event through a non intrusive popup for example. But will the user see this popup when it isn't behind it's computer?
This is where this class comes in. When you detect that the user is idle you stack the notification events until the user is active again to show them to your user.
I have seen bad implementations that use hooks to intercept window messages. But those are real nasty and have impact on system performance. This class uses the
GetLastInputInfo api call to ask the system once in a while if there has been user activity. Just take a look at the code by downloading the class
IdleTimer.cs.
I have seen some implementations that detect a user idle'ness this way but not a single one also includes an event that get's fired when a user is available again. So that is my UDP (unique download point...).