Posted 21 July 2021, 9:48 am EST - Updated 3 October 2022, 10:40 pm EST
See attached sample (.NET framework 4.8).
DpiTest48.zip
To reproduce the issue, you need a recent Win10 with two screens. One screen is at 100%, the other at 125%. When the app is started (on my machine on the screen with 100%), click one of the two buttons and move the dialog form to the other screen and back.
With AutoScaleMode = “Dpi”, the grid inherits the scaled form font.
With AutoScaleMode = “Font”, the grid font does not scale, while the rest of the form changes as expected.
At 100 percent:
At 125 percent:
We use “AutoScaleMode = Font”, as we apply the “SystemFonts.MessageBoxFont” to our application, depending on the OS settings.
This might be a blocker to switch our app to 4.8 dpi awareness, if there is no workaround.
Best regards
Wolfgang