It’s my first time trying to make anything really interesting in C# and I was trying to make a simple form or game screen where the user could define a custom resolution/screen ratio etc. or to automatically detect the max screen size/ratio and output? its my first game, so I was wondering if it was possible or if there would be any major issues with such, rather than just setting it to 1366×768 (the resolution of all of my computers).
Thanks in advance for any assistance.
It’s my first time trying to make anything really interesting in C# and I
Share
You could enumerate through the default GraphicAdapter’s DisplayModeCollection property to find the DisplayMode with the max width/height/aspect ratio.
Something like:
Maybe there’s a better way, but that’s certainly one way you could find the max.
Or, you could take the same DisplayModeCollection and populate a comboBox of sorts or a list, letting the user choose for themselves.
My apologies if the above code doesn’t work in that exact form. I can’t test it where I am currently