winforms
winforms copied to clipboard
[HDPI] SystemAware - wrong Form.ClientSize with DPI other than 100%
.NET version
8.0.7
Did it work in .NET Framework?
No
Did it work in any of the earlier releases of .NET Core or .NET 5+?
Behavior is identical with .Net versions from 5.0 to 8.07. .NET Framework 4.8. have similar issues but size error is smaller.
Issue description
SystemAware (or PerMonitorV2 starting scale) will calculate wrong Form.ClientSize for dpi more than 100%.
The problem was discovered in https://github.com/dotnet/winforms/issues/12132#issuecomment-2382306850.
See screenshots.