恢复“TopMost” “全屏模式”后的窗口行为已结束 (.NET)
我有一个(Windows 窗体)应用程序,它由一个设置了“TopMost”属性的单个窗口组成。如果应用程序(例如PowerPoint)暂时进入全屏模式,则我的窗口的“最顶层”行为不会恢复(即,它将在最大化的PowerPoint 窗口中保持隐藏状态)。有趣的是,只有当我的应用程序在其他应用程序之前启动时才会发生这种情况 - 如果其他应用程序在我的应用程序之前启动,则事情按预期工作。激活窗口(手动单击它)可以恢复所需的行为,但不幸的是这对我来说不是一个解决方案。
我不确定是什么原因导致了这个问题,我对修复或解决方法非常感兴趣。
由于这可能是与操作系统相关的问题,我应该指出我使用的是 Windows 7 64 位。
谢谢, 彼得
I have a (Windows Forms) application that consists of a single window with the "TopMost" property set. If an application (e.g. PowerPoint) temporarily enters full screen mode the "TopMost" behavior of my window is not restored (i.e. it will remain hidden the maximized PowerPoint window). Interestingly, this only happens when my application is started BEFORE the other application -- if the other application is started prior to mine things works as expected. Activating the window (manually clicking on it) restores the desired behavior but this is unfortunately not a solution for me.
I am unsure what causes this problem and I would be very interested in fix or a workaround.
Since this may be an OS related issue I should point out that I am using Windows 7 64-bit.
Thanks,
Peter
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试将最顶层的属性设置为:
false
然后返回:
true
这应该覆盖 ppts 最顶层的属性。
您可以使用 Timer 类在程序中每隔几秒重复一次此操作
Try setting the topmost property to:
false
Then back to:
true
This should override ppts topmost property.
You can repeat this every few seconds in your program using the
Timer
class