views:

330

answers:

2

I have a long-running GUI application that outputs various statuses to the user. The user wants to view every status but doesn't want to worry about the screensaver kicking in after the inactivity settings.

Preferably in C#, how do I read the screensaver/power scheme settings (so I can reapply them when my app exits) and use settings appropriate for my app (basically disabling them)?

EDIT: I'm going to run my own tests on these answers before I mark either as a solution. If someone has had success with either, please vote it up so I try it first.

+1  A: 

The screensaver timeout values are in the registry:

How can I change the screensaver timeout values (sample code in there should be easy enough to convert to C#)

Not sure about the power scheme settings but this post might be useful

Paul Nearney
+2  A: 

There's an article at CodeProject that implements an API for manipulating the screen saver (link).

Eric Rosenberger