How to maximize window in XNA

后端 未结 5 2029
离开以前
离开以前 2021-01-14 22:35

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

5条回答
  •  一整个雨季
    2021-01-14 23:08

    @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;
    

提交回复
热议问题