I wanted to be able to turn on/off my monitors from a Delphi script, from Windows XP to 7.
I have searched within the Delphi section on stackoverflow and didn’t find the answer.
I also found many samples which doesn’t work anymore on Windows 7 (only with XP).
I have successfully tested this on Windows XP and Windows 7:
To turn off the monitor:
To turn on the monitor: