Hi,
It turned out to be simple:
SetCursorPos(0,0) which resets the screen saver timeout and then I can
disable it.
Thanks for the suggestions.
John
> > The code fragment below shows the current procedure.
> >
> > procedure TPlotScrForm.ScreenSaverActivate( SetOn : Boolean );
> > if SetOn then begin
> > if (SystemParametersInfo(
> > SPI_SETSCREENSAVEACTIVE,
> > 1,
> > @SetOn,
> > SPIF_SENDCHANGE
> > )) then
> > ;
> > end
> > else begin
SetCursorPos(0,0); // Turns off the screen saver
resetting the current timeout.
// Now disable the screen saver.
> > if (SystemParametersInfo(
> > SPI_SETSCREENSAVEACTIVE,
> > 0,
> > @SetOn,
> > SPIF_SENDCHANGE
> > )) then
> > ;
> > end;
> > end;
> >
>
>
>
Automation Artisans Inc.
http://www.autoartisans.com
Ph. 1 250 544 4950
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Rob Kennedy
> Sent: Tuesday, July 10, 2007 9:36 AM
> To: Borland's Delphi Discussion List
> Subject: Re: Turnning off Screen Saver.
>
>
> John Dammeyer wrote:
> > Does anyone have any idea on how to turn off the screen saver from
> > within the program? I can disable it so that once it's off
> it won't run
> > again. However, I can't figure out how to tell it to stop
> screen saving
> > and show my updated screen information.
>
> Why does it matter? If the screen saver is running, there's
> obviously not
> anyone at the computer to look at your updated information anyway.
>
> Just update your screen. When people log in and the screen saver
> terminates, they will see the information only a little later
> than they
> would have anyway, but this time their computers are still
> secured by the
> screen saver while they're not there.
>
> --
> Rob
>
>
> _______________________________________________
> Delphi mailing list -> [email protected]
> http://www.elists.org/mailman/listinfo/delphi
>
>
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi