When game is minimized then restored, the resolution goes to 720x576

I am using Monogame and one thing that has bothered me during the development process is when the game gets minimized, which can happen if you take a window then drag it over the running game, then you restore it, the resolution is switching to 720x576. I have not found anything about this problem and I am not sure how to fix it.

How do I fix it so if the game is minimized, and then restored it restores to the proper resolution?


I’ve never seen that behavior myself (when our games are minimized they will return to the same rez when restored). All the same, you could try something like Window.ClientSizeChanged += (Object sender, EventArgs e) => { DoSomethingAboutSettingRezBack(); }; (place in Game constructor).

I would guess you have something else going on though that needs fixing, and this would just be a band-aid to deal with it. Probably a good idea to setup a blank project and see if it is happening there as well.

Ok, maybe I need to do the fresh project approach and see what happens.

1 Like

Thanks for your help. I created a new project and used the OPENGL instead of DirectX and then copied over all my data, and it seems to have fixed the issue. There are no longer resizing issues. Thanks again!

1 Like

Hi @SteveReddoch, Welcome to the Community!

Just so that someone reading this thread in future is not confused not

Is your screen an LCD display with the resolution of 1440x1152? I had one of these before. I think it is forcing into the corner of the screen, are you using borderless window?

Note there are some differences between OpenGL and DirectX. it is ideal to use DirectX for Windows only development.

Should you be developing for other platforms, then this should be fine, just be aware of the Shader differences and input changes, there are a few more but I do not do OpenGL development, so, only know what I see here and there.

Hope that helps.

Happy Coding!

Yes it is a LCD screen. The normal resolution is set to 2560x1440 and yes it is borderless window and YES it is going to the corner of the screen exactly as you stated.

I am really only making a windows game (aspirations to also port to the Mac, but mostly windows).

So do you know what the issue is?



Oh wow ok, umm right now I haven’t a clue but if you can share your screen logic code, someone might be able to identify the issue if it is indeed code related.

Ok I did some more testing, it seems that Window.IsBorderless=true causes the problems. It is what is causing all the problems I’ve been having with the app running, you select another window on a different screen and it minimizes the game then when you try to maximize it, it is in some strange resolution. This can be reproed with a blank project if you have Window.IsBoarderless=True, you run the app, then drag a window from another screen over to the game screen and it causes lots of issues.

I guess Borderless is a bad setting.

1 Like

on the subject of directX vs OpenGL, I will say that the game runs just fine in OpenGL & the # of files required to run it seems way way less than DirectX. If you look at the Bin folder, DirectX has a ton of files it seems to require, where OpenGl is pretty lean & mean. I am not sure why directX has so many. By my calcs, openGl needs 11.6mb + 1.8mb for the monogame framework.

When you look at the directX version it has tons of files 14MB (strange stuff like Microsoft.CodeAnalysis.VisualBasic.DLL) + another 3mb for runtime stuff.

What is strange is directX adds things like “SharpDX.XXXX” but they are not found for OpenGl projects.

It seems the key is:
_graphics.HardwareModeSwitch = false;
_graphics.IsFullScreen = true;

This gives you full screen and windowed. What I was doing was causing problems.

I went back to using DirectX with yet another new project only because my game target audience is windows.

1 Like