如何知道屏幕保护程序何时结束? (解决了) [英] How to know when a screen saver has ended? (Solved)
本文介绍了如何知道屏幕保护程序何时结束? (解决了)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要知道屏幕保护程序何时结束。当屏幕保护程序启动时,Windows会发送带有SC_SCREENSAVE参数的WM_SYSCOMMAND消息,但我无法弄清楚如何判断屏幕保护程序何时结束。谷歌没有用,因为我所有的免费屏幕保护程序应用程序。
有没有人有任何想法?我可以监控鼠标和键盘,但必须有更好的方法。
I need to know when the screen saver has ended. Windows sends the WM_SYSCOMMAND message with the SC_SCREENSAVE parameter when the screen saver starts, but I have not been able to figure out how to tell when the screen saver ends. Google is no use as all I get there is free screen saver apps.
Does anyone have any idea? I could monitor the mouse and keyboard but there has got to be a better way.
推荐答案
有一种方法可以检查屏幕保护程序是否仍在运行。请参阅MSDN上的讨论:屏幕保护程序通知 [ ^ ]。 nobugz [ ^ ]答案显示如何消除SystemParametersInfo
轮询屏幕保护程序的当前状态。
谷歌搜索:C#屏幕保护程序运行
问候,
- Manfred
There is a way of checking if the screensaver is still running. See the discussion on MSDN: Screen Saver notifications[^]. nobugz[^] answer shows how to pinvokeSystemParametersInfo
to poll the current status of the screensaver.
Google search: "C# screen saver running"
Regards,
— Manfred
这篇关于如何知道屏幕保护程序何时结束? (解决了)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文