{$R *.RES} var b: Bool; begin Application.Initialize; { 首先检查屏幕保护程序是否存在 } if (SystemParametersInfo(SPI_GETSCREENSAVEACTIVE, 0, @b, 0) and (b) then begin { 调用屏幕保护 } PostMessage(GetDesktopWindow, WM_SYSCOMMAND, SC_SCREENSAVE, 0); end; Application.Terminate; end.