Anyone know how to programmatically change the text of a marquee screensaver?
-
26-09-2019 - |
문제
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
해결책
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.
다른 팁
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".
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.