How to turn the monitor on and off

posted 13 Mar 2010, 18:01 by Delphi Basics
const
  SC_MONITORPOWER= $F170;

// To turn off the monitor
SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, 2);

// To turn on the monitor
SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, -1);
Comments