How can I check if the user has set a screensaver, or if none is set:
I am not talking about starting screensaver, no, I am talking about check if a screensaver is set or not;) Anyone? Can I do this with P/Invoke?
Call SystemParametersInfo
passing SPI_GETSCREENSAVEACTIVE
. Note that for some versions of Windows this fails and you need to read the registry instead, as described here: http://support.microsoft.com/kb/318781
According to http://www.wikihow.com/Disable-Windows-Login-Screensaver
You can check the registry for a particular user's screensaver:
HKEY_USERS{user}\CONTROL PANEL\DESKTOP
Check this project: http://www.codeproject.com/Articles/17067/Controlling-The-Screen-Saver-With-C it provides what you need and even more.
How can I check if the user has set a screensaver, or if none is set:
I am not talking about starting screensaver, no, I am talking about check if a screensaver is set or not;) Anyone? Can I do this with P/Invoke?
Call SystemParametersInfo
passing SPI_GETSCREENSAVEACTIVE
. Note that for some versions of Windows this fails and you need to read the registry instead, as described here: http://support.microsoft.com/kb/318781
According to http://www.wikihow.com/Disable-Windows-Login-Screensaver
You can check the registry for a particular user's screensaver:
HKEY_USERS{user}\CONTROL PANEL\DESKTOP
Check this project: http://www.codeproject.com/Articles/17067/Controlling-The-Screen-Saver-With-C it provides what you need and even more.
0 commentaires:
Enregistrer un commentaire