Windows Forms: Auto Scale Application

Cleo picture Cleo · Mar 3, 2014 · Viewed 13.9k times · Source

I have a WinForms Application that was designed to support Full HD resolutions (so 1920x1080). Now this App is also supposed to run on a lower resolution: 1600x900. Is there a way to let the application auto scale itself to fit the lower resolution? Like you would just downscale an image, basically resizing and relocating each control. My current forms and panels have set their size to 1900x1080, so they just extend out of the screen on the lower resolution. I have played around with AutoScaleModes and AutoSize, but the best I could get were Scrollbars so that you at least navigate through the forms. Is such a thing as downscaling an application even possible (retaining dimensions/ relative sizes and positions of the controls)?

Thanks in advance for any inputs on this!

Answer

Askolein picture Askolein · Mar 3, 2014

If your main form starts in a maximized mode, it will adjust its size automagically.

But (and this is a huge "but" according to your question): the inner controls won't be scaled as you would see on a smartphone. WinForm is not "vector based" as WPF. If you have a fully loaded form in 1920x1080, when the main form is sized down, the controls won't fit and you will get scrollbars.

So the answer is: No.