有人知道如何以编程方式更改字幕屏幕保护程序的文本吗?

发布于 2024-09-26 00:49:01 字数 188 浏览 1 评论 0原文

对于我正在构建的应用程序,要求是使状态始终清晰可见。起初,我决定简单地禁用屏幕保护程序,但现在认为最好使用滚动选框屏幕保护程序来指示状态。

这可能吗?我该怎么办呢?

由于该应用程序只会安装在我控制下的少数机器上,因此我可以手动将屏幕保护程序设置为选取框(即该应用程序不需要这样做)。我正在使用 C#、.net 和 WinForms

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

零崎曲识 2024-10-03 00:49:01

正如Cipi所说,字幕屏幕保护程序将文本存储在注册表中。但我认为屏幕保护程序在显示之前仅读取该值一次,因此在屏幕保护程序处于活动状态期间您将没有机会更改状态。

您可以创建自己的屏幕保护程序,这并不那么

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.

豆芽 2024-10-03 00:49:01

您可以在 Windows 注册表中的键下更改它的文本:

HKEY_CURRENT_USER\Control Panel\Screen Saver.Marquee\Text 

使用此代码修改注册表中的值:

using Microsoft.Win32;

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

它将把文本设置为“LALALALA”。

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".

甜扑 2024-10-03 00:49:01

您是否真正检查过屏幕保护程序启动后您的应用程序会发生什么情况?

我记得制作了一个设计为 24/7 运行的程序,一旦屏幕保护程序打开,就会内爆,因为 PC 在某种简化状态下运行。

诚然,这可能是由于我们通过 USB 组件进行硬件监控,所以这可能与驱动程序有关,导致我们陷入困境,但是,是的,我在应用程序中观察到了很多奇怪的现象,当屏幕保护程序打开。

在您承诺通过屏幕保护程序显示任何内容之前值得检查一下。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文