dotnet / winforms

Windows Forms is a .NET UI framework for building Windows desktop applications.
MIT License
4.41k stars 984 forks source link

[Tracking] DefaultFont is static and could cause issues in PermonitorV2 applications. #9111

Open dreddy-work opened 1 year ago

dreddy-work commented 1 year ago

.NET version

.NET 8.0

Did it work in .NET Framework?

No

Did it work in any of the earlier releases of .NET Core or .NET 5+?

NO

Issue description

DefaultFontin WinForms is static and currently does not consider the DPI of the monitor into consideration. This need to be investigated for all scenarios in PermonitorV2 mode applications.

Currently, DeviceContextand Font are defaulting to primary monitor and seems working as expected but would need deeper investigation/understanding

Steps to reproduce

Any PerMonitor V2 mode WinForms application with dual monitor with different DPI.

dreddy-work commented 1 year ago

@Tanya-Solyanik, this is tracking issue to deal with device context and FOnt being constant in PermonitorV2 screens. Its always created for Primary monitor and reused.