WinForms and High DPI Monitors
.NET 4.0 WinForms High DPI
- Add an app.manifest file
- Modify the app.config file
.NET 4.0 WinForms and High DPI Monitors
The High DPI support for WinForms is a mess.
Microsoft requires these modifications to the project:
In the project's app.config file insert these lines before the </configuration> line:
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true"/>
Add a new app.manifest file to your application's project (Ctrl+Shift+A) and then uncomment these lines:
Never run Visual Studio with a Screen resolution other than 100%.
That will screw up the forms editor.
(You probably aren't doing that, but I mention it for completeness.)
Copyright Polar Engineering, Inc.