Page 1 of 1

Disabling the ScreenSaver (Desktop Programming, Win32)

PostPosted: Sep 14, 2005 @ 10:43pm
by gamefreaks
Hi people,

A quick question,

Does anyone know of a 'clean' way to programmatically disable the screensaver under Windows? (2K/XP/2K3)

I want to write a quick tray applet that will disable the screensaver when it detects certain apps are running.

Thanks for reading.

-Zak

Edit: Spell-Check!!!

PostPosted: Sep 14, 2005 @ 11:08pm
by StephC
SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, 0, 0, 0);

PostPosted: Sep 15, 2005 @ 12:08am
by gamefreaks
Hi,

That looks like what I am after!

Thank you!