Home   |   Software   |   Practical Jokes   |   Code Corner   |   Workshops


Delphi Secret #10

Turning off a monitor programatically
 
 
     These two commands allow you to turn a monitor on or off without even touching the power button. Works great for pranks!

Code:
 {turns on the monitor}
SendMessage(Application.Handle, wm_SysCommand, SC_MonitorPower, -1);

 {turns off the monitor}
SendMessage(Application.Handle, wm_SysCommand, SC_MonitorPower, 0);







This page was developed by FoxWare Design & Support.
Hosted by www.Geocities.ws

1