即使在全屏游戏中,也始终处于最重要的位置. [英] Always on top, even in fullscreen-games.
问题描述
如何在屏幕上的所有内容上方放置WPF应用?
How do you put a WPF-app on top off everything on your screen?
在运行全屏游戏时,仅设置最高属性是不够的.
Just setting the topmost-property isn't enough when you'r running fullscreen games.
如果任何人都可以使用好的旧表格解决方案,我也会很高兴
If anyone has a sollution for good old Forms i'll also be happy
我在这个论坛上看到很多帖子说这是不可能的,但是我知道这不是很有趣,我已经看到很多应用程序(fraps,teampeak overlay,xfire等).
I've seen many posts on this forum that say it's impossible but i know it's not couse i've seen alot of apps (fraps, teamspeak overlay, xfire, etc) that does this.
推荐答案
HI,
在窗口激活的事件中
添加以下代码
this .Width = System.Windows. SystemParameters .PrimaryScreenWidth;
in the Window Activated Event
add the following code
this.Width = System.Windows.SystemParameters.PrimaryScreenWidth;
this .高度= System.Windows. SystemParameters .PrimaryScreenHeight;
this.Height = System.Windows.SystemParameters.PrimaryScreenHeight;
this .Topmost = true ;
this.Topmost = true;
this .Top = 0;
this.Top = 0;
this .Left = 0;
this.Left=0;
this .Topmost = true ;
this.Topmost = true;
this .Activate();
this.Activate();
这篇关于即使在全屏游戏中,也始终处于最重要的位置.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!