Programmatically prevent Windows screensaver from starting

后端 未结 13 2063
心在旅途
心在旅途 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:55

    Just reset the timeout counter with

    SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, 1, nil, SPIF_SENDWININICHANGE);

提交回复
热议问题