...install a screensaver?

Author: Simon Grossenbacher
Homepage: http://www.swissdelphicenter.ch

Category: System

uses
  
shellapi;

procedure InstallScreenSaver(const FileName: string);
begin
  
{ Set this screensaver as default screensaver and open the properties dialog}
  
ShellExecute(Application.Handle, 'open', PChar('rundll32.exe'),
    PChar('desk.cpl,InstallScreenSaver ' + FileName), nil, SW_SHOWNORMAL);
end;


procedure TForm1.Button1Click(Sender: TObject);
begin
  
InstallScreenSaver('c:\YourScreenSaverFile.scr');
end;

 

printed from
www.swissdelphicenter.ch
developers knowledge base