问题描述
人们可以建议的一种解决方案是定期寻找特殊的屏幕保护程序"桌面,如果存在,则将其视为正在运行的屏幕保护程序.
One solution that one could suggest is to periodically look for a special 'Screen-saver' desktop, and if it's present then count it as a running screensaver.
但显然并非所有屏幕保护程序都如此,因为某些提到的桌面始终存在.
But apparently this is not the case for all screensavers as with some the mentioned desktop is always present.
是否有更可靠的解决方案?
Are there more reliable solutions for this?
推荐答案
我认为关键是通过其窗口类(WindowsScreenSaverClass")来识别屏幕保护程序.我找到了这个页面如何启动、检测和停止屏幕保护程序?有一些代码示例和解释.
I think the key is to identify the screensaver by its window class ("WindowsScreenSaverClass"). I found this pageHow do I start, detect and stop screen savers? that has some code examples and explanations.
这篇关于如何确定屏幕保护程序正在运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!