Mega Code Archive

 
Categories / Delphi / Examples
 

Turn off the monitor

// turn it off: SendMessage(Application.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, 0); // turn it on again: SendMessage(Application.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, -1); Caution: you must ensure the monitor being turned on again after you use this command, otherwise the system must be rebooted!