How Do I...Turn off screensaver?

  • Thread starter Thread starter rspercy
  • Start date Start date
R

rspercy

Ho do I execute the screensaver application using the process control? All I
need to know is the name of the screensaver application so I can set it to
'None' and then reset it before I am done using my app.
THNX in advance for any help. All help is appreciated.
 
rspercy said:
Ho do I execute the screensaver application using the process control?
All I need to know is the name of the screensaver application so I can
set it to 'None' and then reset it before I am done using my app.

It's probably easier to overwrite the Registry entry that holds that
information but ...

/Why/ would you want to disable the user's screen-saver, even temporarily?

OK, this isn't as drastic as, say, dynamically changing their screen
resolution, but it certainly sits in the same category:
"Only with a really, /really/ Good Reason".

Regards,
Phill W.
 
Ho do I execute the screensaver application using the process control? All I
need to know is the name of the screensaver application so I can set it to
'None' and then reset it before I am done using my app.
THNX in advance for any help. All help is appreciated.

What happens if your app crashes before you can reset the user's
screen saver? The user will then have to reset it manually, which
will not be appreciated!

In general, it is a BAD idea to change a user's settings unless, as
Phill W. alluded to, you have a really, really good reason.

Chris
 
I'm fairly sure there's a SystemParametersInfo call (P/Invoke) which will do
what you want - it's used by other apps particularly full screen media
players (except for the QuickTime) to disable the screen saver while they're
running so that you don't have to keep moving the mouse just to watch a
movie.

The system call in question should only live for the lifetime of your
process, so even if your app terminates unexpectedly the user's screen saver
should be re-enabled. It's a much better (and safer) solution than writing
to the registry and should do what you want.
 
Phill W. said:
It's probably easier to overwrite the Registry entry that holds that
information but ...

/Why/ would you want to disable the user's screen-saver, even temporarily?

Imagine writing a presentation software (like Microsoft PowerPoint)...
 
Herfried K. Wagner said:
Imagine writing a presentation software (like Microsoft PowerPoint)...


To the best of my knowledge, MS Powerpoint does not disable the screensaver.
 
To the best of my knowledge, MS Powerpoint does not disable the
screensaver.
Mike

Perhaps not, but various mainstream media players do. I don't think this is
a nefarious request, and can see how some software would need to have this
ability by necessity. I for one despise the fact that Apple's QuickTime
player requires me to move the mouse every few minutes to stop my machine
from engaging the screen saver. WMP, VLC Media Player, and (I think) even
RealPlayer are smart enough to disable the screensaver for the lifetime of
the process.
 
Back
Top