Know when computer is locked

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
 
G

Gabriel Lozano-Morán

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top