Windows 10 and supporting app resizing and different screen resolutions

I noticed the new Windows 10 apps do not open full screen like they did in Windows 8. They open by default to a window. If the user maximizes the window, closes the app, and reopens the app, then the window is still maximized. This is okay with me.

Only once the user clicks a full screen button does the app go back to full screen like it was in Windows 8. This is not a setting that is kept upon the app being launched next time.

Now here is my problem, I built two version of my GUI. One for the lowest resolution (at the time of Windows 8) which would be scaled to the desired screen resolution size through a matrix. The matrix detects the initial screen size of the computer. Another GUI is used for 1920+x1080+ monitors to prevent massive stretching.

Under Windows 10, the app doesn’t launch under any circumstance on a 1920x1080 monitor to 1920x1080 resolution until the user clicks the maximize screen button. It will never detect my HD GUI setting.

Now here is the bigger problem. Lets assume I only have the lower resolution GUI that has been scaling just fine. The user goes full screen. My game is leaving blank space. Why? The screen size just massively changed and I don’t have a method to detect that new size.

I need a legitimate method to detect screen size at all running times, including the re-sizing of these windows. This is bad.

Your best bet is to check the current regulation every few updates. Create an event and have it fire when the resolution changes. Put all your display setup code in that event.

On a side note does setting isfullscreen = true have no effect? Iv not started developing for win10 yet so interested to know

Can’t you just handle the GameWindow.ClientSizeChanged event:

this.Windows.ClientSizeChanged += Window_ClientSizeChanged;

and in the handling code react to the new window dimensions?

void Window_ClientSizeChanged(object sender, EventArgs e)
{
int width = this.Window.ClientBounds.Width;
int height = this.Windows.ClientBounds.Height;
//do something with the new width x height
}

As for setting isfullscreen = true, it has no effect in Windows 10 (Monogame v3.4).