XNA - 如果切换全屏,Windows Aero 效果将不再存在
我正在使用 togglefullscreen()
函数在窗口模式和窗口模式之间切换。我的应用程序(游戏)全屏。
当我在窗口模式下运行游戏时,标题栏应有Win7的Windows Aero效果,但是当我进入全屏并返回窗口模式时,窗口标题栏中不再有Aero效果,只是一个普通的标题栏
同样,如果我以全屏模式启动游戏,然后切换到窗口模式,不再有空气动力效果。为什么会发生这种情况?如何恢复空气动力效果
i am using togglefullscreen()
function to ofc toggle between window mode & full screen for my application(game).
When i run the game in window mode, the title bar has the Windows Aero Effect of Win7 as it should be, but when i go full-screen and come back to window mode, then there is no more Aero Effect in window title bar, just a normal title bar
Similarly if i start the Game in full screen mode and then toghle to window mode, there is no more aero effect. Why is that happening & how to get back aero effect
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Windows 禁用 Aero,因为当您在全屏应用程序中时,用户通常看不到标题栏或任务栏,因此计算“良好”图形(例如透明度)只是浪费时间。如果关闭程序后 Aero 没有重新启动,那么您可以像这样创建一个 .bat 文件:
这将停止控制 aero 的服务,然后重新启动它(如果应该存在,它总是会带回该方案。(显然)这不是 C# 中的,但如果您可以使用 Process 类或通过使用一些参数启动 cmd.exe 来执行相同的操作 (
"/C. "
将允许您调用命令cmd.exe
)。Windows disables Aero because while you're inside a fullscreen app, the user usually doesn't see the title bar or task bar so it's just a waste of time to compute the 'good' graphics (transparency for example). If Aero doesn't restart after you close your program, then you can make a .bat file like so:
This will stop the service controlling aero, and then restart it (which always brings back the scheme if it should be there. (Obviously this is not in c#, but if you can do the same thing using the
Process
class, or by startingcmd.exe
with some arguments. ("/C"
will allow you to call commands fromcmd.exe
).