views:

74

answers:

3

For an app I'm building, a requirement is to have the state subtly visible at all times. At first I decided to simply disable the screensaver, but now think it would be preferable to use the scrolling marquee screensaver to indicate state.

Is this possible? How would I go about it?

Since the app will only be installed on a small number of machines under my control, I can manually set the screensaver to be the marquee (i.e. the app shouldn't need to). I'm using C#, .net and WinForms

+1  A: 

You can change text of it in windows registry under the key:

HKEY_CURRENT_USER\Control Panel\Screen Saver.Marquee\Text 

Use this code to modify the value in registry:

using Microsoft.Win32;

RegistryKey marquee= Registry.CurrentUser.OpenSubKey(@"Control Panel\Screen Saver.Marquee", true);
marquee.SetValue("Text", "LALALALA", RegistryValueKind.String);

It will set text to "LALALALA".

Cipi
Will this cause the screensaver text to change even when it's already running?
Tom Wright
I've never tried it but I would be very surprised if it did - There's no reason the screensaver would expect the text to change while it's being displayed...
Basiclife
I don't think that it will change the text while screen saver is running (**actually I'm pretty sure that it will NOT**), but you can change the registry setting and restart screen saver with new text... Or if this is not what you want, you best bet is to hack OpenGL displaying the text...
Cipi
+5  A: 

As Cipi said marquee screensaver stores text in registry. But I think that screensaver reads this value only once before it is shown, so you will have no chance to change the status during screensaver is active.

You can create your own screensaver it's not so hard.

Orsol
Yes, that would be a good alternative.
Cipi
+1 great link included
Adkins
A: 

Have you actually checked what happens to your application once the screensaver kicks in?

I remember making a program designed to run 24/7 just implode once the screensaver went on, due to the PC operating in some kind of reduced state.

Admittedly, this might have been due to the fact that we were doing hardware monitoring via a USB component, so it could have been something to do with the drivers for that screwing us up but, yeah, I've observed much strangeness in applications when the screensaver comes on.

Worth checking out before you commit to showing anything via the screensaver.

Frosty840