当用户点击“Windows键+ d”时,如何控制窗口行为? [英] How can I control the windows behavior when the user hits "Windows key +d"?

查看:170
本文介绍了当用户点击“Windows键+ d”时,如何控制窗口行为?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个带有2个顶级窗口的应用程序。两个窗口可以同时打开。一个窗口是win32窗口,另一个窗口是wpf窗口。当两个窗口都打开时,wpf窗口应始终位于win32窗口之前。当用户点击
"Windows key + d"时两次(显示桌面并恢复所有窗口),窗口偶尔会以不同的顺序恢复。


如何强制wpf窗口始终位于win32窗口之前?


桌面恢复后会发送哪些Windows消息/事件?


Yoel

解决方案

嗨Yoelp,


>>如何强制wpf窗口始终位于win32窗口之前?


据我所知,如果您只是确保Wpf窗口可以在之前,则没有这样的API来检测该状态Win32窗口,为什么不使用
Window.Topmost 属性作为解决方法?
https:// msdn。 microsoft.com/en-us/library/system.windows.window.topmost%28v=vs.110%29.aspx


Hi,

I have an application with 2 top-level windows. Both windows may be open at the same time. One window is a win32 window, and the other is a wpf window. When both windows are open, the wpf window should always be before the win32 window. When the user hits "Windows key +d" twice (show desktop and restore all windows), the windows are occasionally restored in a different order.

How can I force the wpf window to always be before the win32 window?

Which Windows messages/events are sent when the desktop is restored?

Yoel

解决方案

Hi Yoelp,

>>How can I force the wpf window to always be before the win32 window?

As far as I know, there is no such API to detect that status, if you just ensure that the Wpf windows can be before the Win32 Window, why not using Window.Topmost property as a workaround? https://msdn.microsoft.com/en-us/library/system.windows.window.topmost%28v=vs.110%29.aspx


这篇关于当用户点击“Windows键+ d”时,如何控制窗口行为?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆