How to maximize window in XNA

后端 未结 5 2031
离开以前
离开以前 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:04

    Set the IsFullScreen property of the graphics device manager to true.

    http://msdn.microsoft.com/en-us/library/bb195024(v=xnagamestudio.10).aspx

        //from the above msdn sample
        graphics = new GraphicsDeviceManager( this );
        content = new ContentManager( Services );
    
        graphics.PreferredBackBufferWidth = 800;
        graphics.PreferredBackBufferHeight = 600;
        graphics.PreferMultiSampling = false;
        graphics.IsFullScreen = true;
    

    http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphicsdevicemanager.isfullscreen(v=xnagamestudio.10).aspx

提交回复
热议问题