How to prevent Windows from entering idle state?

后端 未结 5 1123
执念已碎
执念已碎 2020-11-27 14:38

I am working on a C# application which runs in the background without any Windows control.

I want to notify Windows that my application is still alive to prevent Win

5条回答
  •  孤独总比滥情好
    2020-11-27 15:03

    I don't think there's any way to do this directly in managed code.

    A quick search reveals this post from 2 years ago. Basically you'd need to do some interop to call a raw windows API.

提交回复
热议问题