Created
November 5, 2013 11:56
-
-
Save davidglezz/7318005 to your computer and use it in GitHub Desktop.
Turn off monitor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#define MONITOR_ON -1 | |
#define MONITOR_OFF 2 | |
#define MONITOR_STANBY 1 | |
int main() | |
{ | |
SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, MONITOR_OFF); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment