本文介绍了如何最大限度地XNA窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这应该是一个很简单的问题,但很多搜索后似乎没有工作示例的任何地方。
我只想我的XNA窗口开始最大化。
我知道如何设置窗口的宽度和高度,但是这不完全一样。
我还需要做到这一点而不去全屏。我只想要一个正常的最大化的窗口。

This SHOULD be a very simple question but after lots of searching there seems to be no working example anywhere.I just want my XNA window to start off maximized.I know how to set the width and height of the window, but that's not quite the same.I also need to do this without going full screen. I just want a normal maximized window.

推荐答案

@Cyral有最密切的答案,到目前为止,但它仍然不太你想要什么。为了最大限度地提高Windows窗体,您使用WindowState属性:

@Cyral has the closest answer so far, but it's still not quite what you want. To maximize a Windows Form, you use the WindowState property:

var form = (Form)Form.FromHandle(Window.Handle);
form.WindowState = FormWindowState.Maximized;

这篇关于如何最大限度地XNA窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 22:35