I want, that the monitor will turn off, and after a certain period of time it will turn on. But the monitor doesn't want to turn on. What is wrong i do?
HWND hwnd_monitor = FindWindow(0, 0);
SendMessage(hwnd_monitor, WM_SYSCOMMAND, SC_MONITORPOWER, 2);
Sleep(1000);
SendMessage(hwnd_monitor, WM_SYSCOMMAND, SC_MONITORPOWER, -1);