I have a program. In the background threads, different actions are performed and output data to the form. But the computer can go into sleep / hibernation mode, then the program stops working. How program will force the computer not to sleep? Do uTorrent have such a function in the settings, I would like to know how to do this from C # (.NET)?

    1 answer 1

    Using the WinAPI SetThreadExecutionState function .

    How to prevent windows from entering idle state?