Showing posts with label screen saver. Show all posts
Showing posts with label screen saver. Show all posts

Question:
Some application has fuction to turn off monitor.
Show me how?

Answer:
Please use this command
{ turn off your monitor }
SendMessage(Application.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, 0);
{ turn on your monitor }
SendMessage(Application.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, - 1);





Question:
I want to immediatelly start screensaver during my application active.
How to do that?

Answer:
Just apply this simple code to your application.



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



CLICK TO REGISTER