• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 257
  • Last Modified:

Enable / Disabling screen saver via API !

Did someone knows the API function for enabling and disabling the screen saver ?
0
mike_marquet
Asked:
mike_marquet
  • 2
1 Solution
 
ZoppoCommented:
Hi mike_marquet,

you can use SystemParametersInfo(). See MSDN article Q126627...

hope that helps,

ZOPPO
0
 
nils pipenbrinckCommented:
SystemParametersInfo (SPI_SCREENSAVERRUNNING, ...).

You can use this function to tell windows that a screensaver is already running. It has the neat side effect, that windows won't start another screensaver.

Hope it helps,
  Nils

(zoppo, you where some seconds faster :)
0
 
ZoppoCommented:
And a bit different: My tip uses SETSCREENSAVEACTIVE instead of SPI_SCREENSAVERRUNNING...
0
 
mike_marquetAuthor Commented:
Thanks
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now