Groupbox incorrectly scale on the high DPI devices when AutoScaleMode is set to DPI
See original GitHub issue.NET version
.Net 6
Did it work in .NET Framework?
Yes
Did it work in any of the earlier releases of .NET Core or .NET 5+?
No
Issue description
The WinForm dialog display incorrectly in the high DPI(>100%) see the screenshot:
This is the correct display:
But if I add a
Font = Font or Scale(new SizeF(1.0F,1.0F)) to the end of InitializeComponent, we can get the right display again:
So why do I need the extra code to make it display correctly? We just migrated our code to .net 6 from .net 4.8. There are no these situations on the .net framework 4.8. Did we have any solution to handle this on the high DPI?
Steps to reproduce
Create a new WinForm project (.net 6) Use a groupbox, and fill in some checkboxes. Set the dialog’s AutoScaleMode to Dpi. Building. Set the system Scale to 200% (system settings ->Display -> Scale and layout). Open the new exe.
Issue Analytics
- State:
- Created 3 months ago
- Comments:15 (10 by maintainers)
Top Results From Across the Web
c# - Windows Forms DPI scaling
Creating a DPI-Aware Application. All containers must use the same AutoScaleMode - this part fixed my problem. It is required that windows ...
Read more >Fix DPI display issues in Windows Form Designer - Visual ...
In the Options dialog, choose Windows Forms Designer > General, and set DPI Scaling Notifications to False. Troubleshoot. If the DPI-awareness ...
Read more >Developer view crisp / Runtime blurry
When AutoScaleMode is set to “DPI”, my runtime button's font looks just a little bit blurry. With the form's “WindowState” set to ...
Read more >RadPageView: incorrect scaling of anchored controls inside a ...
Hello,. At the core of the problem is using: this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;. This will disable scaling logic and ...
Read more >WinForms Scaling at Large DPI Settings–Is It Even Possible?
Let's dive into the specifics of high DPI and try to understand different problems that high DPI displays cause, and how to address...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@dreddy-work verified the sample DocumentDriller in .NET 8.0 latest build 8.0.100-rc.1.23401.24, for both DPI and Font modes on 100% & 300% DPI, at run time, the ComboBox display well as it was in design time. Following is the repro video: Test app: WinFormsApp57.zip

@hmisaki, Our objective is to enhance the overall user experience in .NET Core when utilized with high DPI devices. This is particularly relevant for SystemAware (default mode) applications, and it aligns with the priority of our ongoing work in WinForms. Regarding the release schedule, I will provide an update once we complete the initial investigation and have a clear understanding of the extent of the required fix.