How to make windows game fill the entire screen

I am using Monogame with XNA to create a windows phone game. It also looks much better on a bigger screen, so I want to make a Windows version of the game. If I open VIsual Studio 2012 and create a Mongame windows project, and then run the game, the game is displayed in a window which is a little over a quarter of the entire width and length of my entire scree. How can I make my gaming window that it fills the entire screen? Or at least 3/4 of it?

After you create the instance of the GraphicsDeviceManager in your Game class constructor you can use the instance to set the desired back buffer resolution (and whether it’s full screen or not). If you want to change these settings later while the game is running call ApplyChanges() method on the GraphicsDeviceManager instance.


// in your game constructor
graphicsDeviceManager = new GraphicsDeviceManager(this);
graphicsDeviceManager.PreferredBackBufferWidth = 1024;
graphicsDeviceManager.PreferredBackBufferHeight = 720;
// outside your game constructor
graphicsDeviceManager.IsFullScreen = true;


LithiumToast’s solution will upscale however, that means that the rendering resolution is 1024x720 even though you are using fullscreen. Which may be what you want when your windows phone game has a set resolution and all assets are optimized for that.

However if you want maximum sharpness set the resolution to your native monitor/windows resolution like this instead:

graphicsDeviceManager.PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width;
graphicsDeviceManager.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height;

If you use

graphicsDeviceManager = new GraphicsDeviceManager(this);
graphicsDeviceManager.PreferredBackBufferWidth = 480;
graphicsDeviceManager.PreferredBackBufferHeight = 270;

and then set

graphicsDeviceManager.IsFullScreen = true;

Will your game still be a “480x270” game but stretched to full screen? So a 1920x1080 (4804, 2704)screen will fill the same graphics in your screen (ie like each pixel now takes up a 4x4 space).

What will happen on say 1024x720 (where 1024/480 != 720/270), will it stretch or will it just make it look “letterbox”?

it will be stretched, letterboxing would have to be done manually. The stretching is non-uniform. So you can stretch a 200x200 to 400x200 but it will then obviously only stretch horizontally

Thank you Gentlemen for the help. Very much helpfull.