If you want to turn off the screen saver while your program is running, you don't have to disable the Windows screen saver at all. Just define the following method to handle the appropriate Windows message:
procedure TForm1.AppMessage (var Msg: TMsg; var Handled: boolean);On the form's OnCreate event, assign
begin
if (Msg.Message = WM_SYSCOMMAND) and (Msg.wParam = SC_SCREENSAVE) then
Handled := true;
end;
Application.OnMessage := AppMessage;
0 comments:
Post a Comment