Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 254
  • 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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

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