DelphiFAQ Home Search:
General :: Windows :: Programming :: Windows with Delphi :: Windows API
Windows programming with Delphi

Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Only the 40 most recently viewed articles are shown.
You can see the full list here.

Featured Article

How do I switch the monitor on/ off using ObjectPascal?

Provided that you monitor supports this interface, you can use the new system command message
SC_MONITORPOWER as shown in the following function:

// Power saver mode interface
 procedure SwitchMonitorOn (on : boolean);
 const
   lp : array [false..true] of longint = (0, -1);
 begin
   SendMessage(Application.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, lp[on]);
 end;