Windows with Delphi Windows API (94) Windows Filesystem (41) Windows Forms (69) Windows Graphics (38)
Exchange Links About this site Links to us 
|
How do I switch the monitor on/ off using ObjectPascal?
This article has not been rated yet. After reading, feel free to leave comments and rate it.
Provided that you monitor supports this interface, you can use the new system command message
SC_MONITORPOWER as shown in the following function:
 | |  | | procedure SwitchMonitorOn (on : boolean);
const
lp : array [false..true] of longint = (0, -1);
begin
SendMessage(Application.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, lp[on]);
end; | |  | |  |
Comments:
|