質問

How do I get the user's setting for screensaver / machine lock time?

Is there a function in C#?
If not, what is the WIN API function for this?

役に立ちましたか?

解決

The screen saver timeout is obtained by calling SystemParametersInfo with the action SPI_GETSCREENSAVETIMEOUT.

他のヒント

Registry key - HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Control Panel\Desktop look at the value of ScreenSaveTimeOut

Keep in mind your application will have to run with elevated rights in order to access the registry.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top