Activate screensaver

Posted in System

Use DefWindowProc or SendMessage procedure for send WM_SYSCOMMAND message:

procedure TForm1.Button1Click(Sender: TObject);
begin
  DefWindowProc(Form1.Handle,WM_SYSCOMMAND,SC_SCREENSAVE,0);
end;