cskiong
asked on
Detecting Screen saver running, desktop lock and unlock event
Hi Experts,
Is there a way to detect the following event on windows?
1. Screen saver starts running (due to idle).
2. Computer lock (User locks computer by Ctrl+Alt+Del or [Windows] key + L)
3. Resume from screen saver or computer lock.
Thank you
Is there a way to detect the following event on windows?
1. Screen saver starts running (due to idle).
2. Computer lock (User locks computer by Ctrl+Alt+Del or [Windows] key + L)
3. Resume from screen saver or computer lock.
Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I do not know the situation in your system but you can always write your own screen saver and send kind of message from it. But this will work only in your own environment.
I've got better screensaver start detection: trap messages and when screensaver is started there is WM_SYSCOMMAND with SC_SCREENSAVE sent by the system.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can use SystemParametersInfo with the SPI_GETSCREENSAVERRUNNING flag