Solved

Enable / Disabling screen saver via API !

Posted on 2000-03-23
4
237 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to bring to back always mid parent image form 21 77
C#: need to import an entire CSV file 4 51
Explain Unit of Work pattern 2 59
Best book to learn C++ 4 70
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…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now