Sabtu, 08 Desember 2018

turn off and Turn On monitor

#include int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { // Turns the monitor off SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, (LPARAM) 2); // Higher number is longer monitor off. Sleep(10000); // Turns monitor on SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, (LPARAM) -1); return 0; }

0 Comments:

Post a Comment