0

I have tried nearly all approaches that should allow reasonable scaling on for example 4K monitors. None works for me perfectly, sometimes there are problems with single controls (MenuStrip for example), sometimes there are problems with moving to another monitor, sometimes there are problems on HD, sometimes on 4K,...

The way that brought the most compatibility was the one described here: https://blogs.windows.com/windowsdeveloper/2017/05/19/improving-high-dpi-experience-gdi-based-desktop-apps/

I have extended the manifest file:

<asmv3:application>
    <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2017/WindowsSettings">
       <gdiScaling>true</gdiScaling>
    </asmv3:windowsSettings>
</asmv3:application>

For example, for TabPages, ListViews, Groupboxes this solution works well (at least on all resolutions/scalings it looks OK), but button texts, labels and the MenuStrip are a bit blurred at for example 4K. Furthermore, a CustomListView (UserControl) is also blurred in contrast to the original ListView. I think its because these controls uses another graphics api for drawing their content.

Image: Compare crisp and blurry components

Is there a way to improve this blurring?

0x802a
  • 1
  • Use `gdiScaling` if you don't want to update your legacy application to support DpiAwareness. It may help is some situations (mostly, bitmap rendering), but it may screw up the layout somewhere else in the application. Make your app DpiAware (possibly, per-monitor (V2)) and handle the Dpi changes. Yes, it take some work and testing. In Windows 10, you have some more options: you can setup DpiAwarenes in a per-thread basis. So you can upgrade your app in steps (applying and testing DpiAwarenss in some parts first and let the System scale other parts). – Jimi Jan 16 '20 at 20:56
  • See also the `app.config` High Dpi settings for specific controls. This post: [High-DPI Scaling Improvements for Desktop Applications in the Windows 10 Creators Update (1703)](https://blogs.windows.com/windowsdeveloper/2017/04/04/high-dpi-scaling-improvements-desktop-applications-windows-10-creators-update/) and [these](https://stackoverflow.com/a/50276714/7444103) notes may be useful. – Jimi Jan 16 '20 at 21:02

0 Answers0