If you want to run default system screensaver from your application,
it’s really easy. Just few lines of code. Here’s how to do it…
procedure TForm1.Button1Click(Sender: TObject); var b : boolean; begin if not SystemParametersInfo(SPI_GETSCREENSAVEACTIVE, 0, @b, 0) then exit; if not b then exit; PostMessage(GetDesktopWindow, WM_SYSCOMMAND, SC_SCREENSAVE, 0); end;
Running screensaver can be deactivated usual way, just move your mouse or press any key.
Δεν υπάρχουν σχόλια:
Δημοσίευση σχολίου