如何检测 Aero Peek 模式是否开启
我试图找出如何检测 Windows 桌面 Aero Peek 模式已开启。特别是,我需要检测我的窗口内容是否显示或绘制为具有透明背景的框架。我知道我可以从 Aero Peek 中排除我的窗口,但这不是我目前需要的。
TIA
I'm trying to find out how to detect if windows desktop Aero Peek mode is on. In particular I'm need to detect if my window content is shown or drawn as a frame with transparent background. I know I can exclude my window from Aero Peek, but this not what I need at this moment.
TIA
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您从 Windows 注册表中读取信息,您可以在那里找到 Aero Peek 的状态
是一个名为 EnableAeroPeek 的 DWORD 值,设置如下:
只需比较 0 或 1 即可确定 AeroPeek 是否已打开。
在 C# 中,类似这样:
...
您还可以更改这些值,Aero Peek 状态将立即更改。
If you read from windows Registry, there you can find the status of Aero Peek
Is a DWORD value named EnableAeroPeek which is set as following:
Just compare to 0 or 1 to find out if AeroPeek is on.
In C# something like this:
...
You can also change those values and instantly Aero Peek status will change.
这就是你所追求的吗?
Is this what you are after?
当用户通过将鼠标悬停在任务栏图标上窥视窗口时,您的桌面将进入“Aero Peek”模式。您可以使用 Windows 事件挂钩跟踪是否显示“任务切换器”对象,结合其上的 DWM 模式应该告诉您用户是否正在查看窗口。下面是我为测试这个想法而制作的一个应用程序(C++,如果将其转换为 C# 时出现问题,请告诉我)。
希望这有帮助,问候
your desktop would go into this "Aero Peek" mode when user is peeking windows by hovering mouse over taskbar icons. You can use windows event hook to trace if "Task Switcher" object is shown, combined with DWM mode on it should tell you if user is peeking a window. Below is an application I made to test this idea (c++, let me know if there are problems converting it to c#).
hope this helps, regards