Programmatically prevent Windows screensaver from starting

后端 未结 13 2017
心在旅途
心在旅途 2020-12-03 00:58

Is there a recommended way to prevent the Windows screensaver from starting? The closest thing I\'ve found is this article, but what I would really like to do is just tell

13条回答
  •  抹茶落季
    2020-12-03 01:48

    SystemParametersInfo

    Specifically, the SPI_SETSCREENSAVEACTIVE parameter.

    Does this not work? I was surprised that I did not see it here. Note that SetThreadExecutionState will not affect the screen saver at all, just the sleeping of the display.

提交回复
热议问题