有人知道如何以编程方式更改字幕屏幕保护程序的文本吗?
对于我正在构建的应用程序,要求是使状态始终清晰可见。起初,我决定简单地禁用屏幕保护程序,但现在认为最好使用滚动选框屏幕保护程序来指示状态。
这可能吗?我该怎么办呢?
由于该应用程序只会安装在我控制下的少数机器上,因此我可以手动将屏幕保护程序设置为选取框(即该应用程序不需要这样做)。我正在使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
正如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.
您可以在 Windows 注册表中的键下更改它的文本:
使用此代码修改注册表中的值:
它将把文本设置为“LALALALA”。
You can change text of it in windows registry under the key:
Use this code to modify the value in registry:
It will set text to "LALALALA".
您是否真正检查过屏幕保护程序启动后您的应用程序会发生什么情况?
我记得制作了一个设计为 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.