首页  编辑  

安装屏幕保护程序

Tags: /超级猛料/OS.操作系统/任务栏/   Date Created:

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;