Skip to content

Instantly share code, notes, and snippets.

@davidglezz
Created November 5, 2013 11:56
Show Gist options
  • Save davidglezz/7318005 to your computer and use it in GitHub Desktop.
Save davidglezz/7318005 to your computer and use it in GitHub Desktop.
Turn off monitor
#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