Solved

Enable / Disabling screen saver via API !

Posted on 2000-03-23
4
240 Views
Last Modified: 2013-12-03
Did someone knows the API function for enabling and disabling the screen saver ?
0
Comment
Question by:mike_marquet
  • 2
4 Comments
 
LVL 31

Accepted Solution

by:
Zoppo earned 25 total points
ID: 2648920
Hi mike_marquet,

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

hope that helps,

ZOPPO
0
 
LVL 4

Expert Comment

by:nils pipenbrinck
ID: 2648929
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
 
LVL 31

Expert Comment

by:Zoppo
ID: 2648948
And a bit different: My tip uses SETSCREENSAVEACTIVE instead of SPI_SCREENSAVERRUNNING...
0
 

Author Comment

by:mike_marquet
ID: 2648961
Thanks
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question