Groupbox incorrectly scale on the high DPI devices when AutoScaleMode is set to DPI
- Dominant language
- C#
- Stars
- 4.9k
- Forks
- 1.1k
- Avg merge
- 20h 23m
- Merged PRs (30d)
- 103
Description
### .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.
Contributor guide
Assessment
This issue has not been assessed yet.