Windows Forms - Make controls the same size across displays

286 Views Asked by At

I have been looking into High DPI support for Windows Forms, as per the following link.

https://learn.microsoft.com/en-us/dotnet/desktop/winforms/high-dpi-support-in-windows-forms

However, I'm not sure exactly what the High DPI support actually accomplishes, does the High DPI support simply mean that controls and fonts will be rendered smoothly on High DPI displays?

I have tried enabling High DPI via an Application Manifest File in my Windows Forms project, but this didn't seem to have any visible effect on the application. Everything still appears to be the same size within the application.

--

I've also been looking at the following link regarding automatic form scaling.

https://learn.microsoft.com/en-us/dotnet/desktop/winforms/forms/autoscale

However, again I'm not sure what this is saying, will the auto-scaling actually make controls and fonts look bigger on a high DPI display?

--

Now for my actual problem.

I am designing a form which is 405x720 pixels in size on a 24 inch 1920x1080 display @ 96 DPI. I want the controls and fonts on the form to have the same physical dimensions when displayed fullscreen on a 6 inch 720x1280 screen which is around 244 DPI.

There is a potential solution for this at the following link.

Scale windows forms window

Is an approach similar to the one in the above StackOverflow link above still the only way to achieve what I am looking for regardless of the High DPI improvements in the latest versions of .NET, or am I potentially missing something with the High DPI and automatic scaling?

0

There are 0 best solutions below