How to use .NET to turn on the monitor after turning on the idle timer?

How to turn on the monitor after the idle timer has disabled it? I have power settings in Windows 7: Turn off the monitor after: 1 minute
Go to sleep: Never

But I do not know how to return it back through the code.

+3
source share
2 answers

This looks promising: http://www.codeproject.com/KB/cs/Monitor_management_guide.aspx

It uses the SendMessage API call:

SC_MONITORPOWER . , . lParam :

-1 -

1 -

2 -

+1

? , WinAPI:

SetThreadExecutionState (ES_DISPLAY_REQUIRED)

, .net, .

0

Source: https://habr.com/ru/post/1717771/


All Articles