How do I turn off the windows screen saver if it is running using C#?

前端 未结 4 722
无人共我
无人共我 2021-01-19 20:21

Ok, so I found some code to check if a screensaver is running and kill it if I want to. This doesn\'t seem to work on Windows 7 PCs. Does anyone know how this code can be mo

4条回答
  •  一向
    一向 (楼主)
    2021-01-19 21:05

    The easiest way is to fake a mouse move event with x=y=0 by calling SendInput().

提交回复
热议问题