title: How do I detect a Lock This Computer command from a WPF application?
body: <p>Would prefer an answer in C#, .Net 3.5 using WPF (Windows Forms also okay)</p>
  
  <p>I have an application that is essentially a toolbar window or tray icon.  It needs to detect if a user locks his/her workstation and walks away in order to update the person's status in a centralized system.</p>
  
  <p>I can detect a session switch or a logout easily enough, using the SystemEvents, but I cannot for the life of me figure out how to detect or receive an event on Lock.</p>
  
  <p>Thanks for any assistance.</p>