1. Technology

Activate/Deactivate the Screen Saver

By

Sometimes you want to deactivate the current screensaver when performing some very long process. You can use this function to activate or deactivate the screensaver. Pass True to activate it, or False to deactivate it.

~~~~~~~~~~~~~~~~~~~~~~~~~
function ActivateScreenSaver
         (Activate: boolean): boolean;
var IntActive: byte;
begin
   if Activate then
     IntActive := 1
   else
     IntActive := 0;

   Result := SystemParametersInfo
             (SPI_SETSCREENSAVEACTIVE, IntActive,
              nil, 0) ;
end;
~~~~~~~~~~~~~~~~~~~~~~~~~
Here some more screen saver development articles.

Delphi tips navigator:
» Implementing Application.Restart
« Get Cursor Image (draw it on a Canvas)

©2014 About.com. All rights reserved.