[Solved] How to check if the mouse did not move for 2 minutes in WPF?


  1. Add a timer control to your application.
  2. Subscribe to mouseover and keydown events – when they fire, reset the timer.
  3. When the timer fires (ie mouse hasn’t moved and key’s haven’t been pressed for x amount of time), lock the screen / prompt for login.

This could also help: http://www.codeproject.com/Articles/13756/Detecting-Application-Idleness

solved How to check if the mouse did not move for 2 minutes in WPF?