http://www.pascalgamedevelopment.com...t=wmsyscommand

have a look there

This is what I use - but more info in the thread


procedure WMSysCommand(var Msg : TWMSysCommand); message WM_SYSCOMMAND;

[pascal]// SWITCH OFF THE SCREENSAVER AND THE MONITOR POWER SAVER IF THEY TRY TO CUT IN
procedure TForm1.WMSysCommand(var Msg : TWMSysCommand);
begin
//catch the message and turn it off
if (Msg.CmdType = SC_MONITORPOWER) or (Msg.CmdType = SC_SCREENSAVE) then
begin
Msg.Result := -1;
end
else
inherited;///Otherwise do whatever is supposed to be done
end;[/pascal]