Know when computer is locked

  • Thread starter Thread starter Steve Amey
  • Start date Start date
S

Steve Amey

Hi all

In my .NET application (maybe run as a service), is there a way to know when
my computer is locked? I want to write an app that logs when the computer
has started and when it has been shutdown, but also log when the computer
was locked. Our system administrator has set our computer to lock
automatically after 15 minutes if it's inactive, and I could always lock my
computer manually using CTRL+ALT+DLT.

Is this possible? Is it also possible for screensavers as well??

Kind Regards,
Steve
 
You can check if the screensaver is active by checking if the process is
running. To be honest I don't think that there is a clean way to check
wether the computer has been locked with Ctrl + Alt + Del or event if it is
in the "locked" state.

Gabriel Lozano-Morán
 
Back
Top