(我认为 Aero 是这个词)。
当我在窗口模式下启动我的 XNA 程序时,我看到了 Win7/Vista 程序上的光泽条。
当我设置为全屏然后恢复时,我将有一个纯蓝色的“基本”标题边框。
如何将其主题或样式设置回 Aero 样式?
(我认为 Aero 是这个词)。
当我在窗口模式下启动我的 XNA 程序时,我看到了 Win7/Vista 程序上的光泽条。
当我设置为全屏然后恢复时,我将有一个纯蓝色的“基本”标题边框。
如何将其主题或样式设置回 Aero 样式?
如果您在切换回窗口模式之前调用以下命令,您将获得 Aero 样式,但它需要您引用System.Windows.Forms。
System.Windows.Forms.Application.EnableVisualStyles();
我不确定这是否是最好的方法,但它确实有效。我在我的 XNA 游戏中使用过它。
作为一个例子,你可以把它挂在你的 Game 类上:
public class FooGame : Game
{
...
private void SetWindow(bool fullscreen)
{
if(!fullscreen)
{
System.Windows.Forms.Application.EnableVisualStyles();
}
this.graphicsDeviceManager.IsFullScreen = fullscreen;
this.graphicsDeviceManager.ApplyChanges();
}
}
祝你好运。
这将有助于:
System.Windows.Forms.Application.VisualStyleState = System.Windows.Forms.VisualStyles.VisualStyleState.ClientAndNonClientAreasEnabled;