如何保持在顶部的NativeWindow [英] how to keep a nativewindow on top

查看:116
本文介绍了如何保持在顶部的NativeWindow的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要保持在NativeWindow我创建的应用程序的主窗口的顶部。

目前我使用的alwaysInFront = true,这并不局限于窗口中的应用程序。我可以成功地同步最小化/恢复/移动/调整操作,因此上面窗口恰当的行为在这种情况下。即使使用此选项,如果我使用Alt-Tab到其他应用程序窗口的推移其他应用程序之上的缺点。

以上,因为我想获得它不使用的alwaysInFront工作。我已经使用orderInFrontOf和orderToFront,它得到它在的地方,但是当我点击主窗口区域的顶部有一个被隐藏起来,即空气使最上面的一个尝试。

我试图捕获的图像启动/关闭事件,但它只是发生在第一次点击,因此在第二点击上面窗口再次成为隐藏。我也试过做的时候主要的一个变为活动窗口上方活跃,但引起的主要一个松散的重点,我无法点击任何东西。

诗。我这样做是为了提高我使用的是HTMLOverlay的行为 - 见<一href="http://stackoverflow.com/questions/1044927/flex-air-htmlloader-blank-pop-up-window-when-flash-content-is-loaded/1077738#1077738">http://stackoverflow.com/questions/1044927/flex-air-htmlloader-blank-pop-up-window-when-flash-content-is-loaded/1077738#1077738

解决方案

我结束了根据是否在主窗口或顶部窗口的alwaysInFront选择开启/关闭

是开启的,即如果不积极的地方我关闭了它。这是另外什么,我在问题中提到。

当用户切换到另一个应用程序通过这种方式,窗口不走在其他应用程序之上。我还是会preFER一个解决方案,我没有使用的alwaysInFront选项,甚至更好的替代解决方案,以在外部网站发出的柔性加载闪存我联系上面。

诗。我会尝试检查与HTMLOverlay的老板提交一个补丁(它的一个进步,但其绑到一个应用程序打开叠加时不会打开额外的窗口)。

更新:我犯了更改HTMLOverlay

I need to keep a NativeWindow I am creating on top of the main window of the application.

Currently I am using alwaysInFront = true, which is not limited to the windows in the application. I can successfully synchronize the minimize/restore/move/resize actions, so the top window behaves appropriately in those cases. Even though using this option has the drawback that if I alt-tab to other application the window goes on top of the other application.

Because of the above I am trying to get it to work without using the alwaysInFront. I have tried using orderInFrontOf and orderToFront, which gets it in place but when I click an area in the main window the top one becomes hidden i.e. air makes it the top one.

I have tried capturing activate/deactivate events but it only happens on the first click, so on the second click the top window becomes hidden again. I also tried making the top window active when the main one becomes active, but that causes the main one to loose focus and I can't click on anything.

Ps. I am doing this to improve the behavior of a HTMLOverlay I am using - see http://stackoverflow.com/questions/1044927/flex-air-htmlloader-blank-pop-up-window-when-flash-content-is-loaded/1077738#1077738

解决方案

I ended up turning on/off the alwaysInFront option based on whether the main window or the top window were active i.e. if none where active I turned it off. This was additionally to what I mentioned in the question.

That way when the user switches to another application, the window doesn't go on top of the other apps. I still would prefer a solution where I don't have to use the alwaysInFront option, or even better an alternate solution to the flex loading flash in external sites issue I linked to above.

Ps. I will try to check with the owner of the HTMLOverlay to submit a patch (its an improvement, although its tied to an app that doesn't open extra windows when opening the overlay).

Update: I have committed the changes to the HTMLOverlay.

这篇关于如何保持在顶部的NativeWindow的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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