As an initiative to save power in my company, I am planning to write an application which turns off the monitor when the user locks his/her PC.
The OS is Windows XP SP2.
I have the code for switching off the monitor.
The user locks his/her machine by either pressing the "WindowsKey + L" or pressing "Ctrl + Alt+ Del" and then choosing the Lock Computer option.
Should I make a windows service? how will the service come to know whether the user has locked the machine?
I want to code it in C#.