We have a legacy .net windows forms application. We've already replaced most of it with a web application, but still use the windows forms application for administration tasks.
When this application is used on a 4k monitor, it looks really bad, and that's understandable.
But the look changes depending of other monitors on the system. The test is done on a lenovo 430 which has a 4k monitor connected via display port. The resolution on the laptop monitor is 1920/1080 and on the 4k monitor its 3840/2160. The display scaling is always 200%.
All of the following screen shots were taken on the 4k monitor.
I am aware that our application will not look good on 4k without changes and setting dpiAware/dpiAwareness.
But my question is: Why does the applications look change only depending on which monitors are active? And is there a way to control which "kind" of look is taken?
Sometimes, it's because the monitor doesn't have a built-in scaling process, which stretches pixels to fit the screen real estate. Scaling is how much everything on the screen should be enlarged when measured in pixels.
Sure, things aren't going to be as crisp, but if you're getting a 24-inch or 27-inch monitor, you probably won't notice the difference, unless you're looking at the two monitors side-by-side.
What Does a 4K Monitor Provide? The term “4K” refers to the next generational leap in display resolution beyond HD (also known as 1080p). While HD content is 1920 x 1080 pixels in size, 4K delivers four times as many pixels at 3840 x 2160.
You can select '100%', '125%', '150%', '175%', '200%', '225%', '250%', '300%' or '350%'. These scaling options, shown below, are found under 'Settings – System – Display'. They can be accessed via 'Settings' on the start menu or alternatively by right clicking on the desktop and selecting 'Display settings'.
Maybe you are aware of this, but it was not mentioned before:
There are 3 kinds of applications:
Details here: https://msdn.microsoft.com/de-de/library/windows/desktop/dn469266(v=vs.85).aspx
You can set the DPI-awareness on your application in app.config:
<appSettings>
<add key="EnableWindowsFormsHighDpiAutoResizing" value="false" />
</appSettings>
and app.manifest:
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">false</dpiAware>
</windowsSettings>
</application>
When you have a DPI >= 150% scaling can additionally controlled via RMB on application -> Properties -> Compatibility -> Scaling on high DPI
For Windows Forms the default is DPI-Scaling disables for high DPI. So everything shoud work out of the box. Maybe one of this settings is not on default? Especially the configuration in the RMB properties on the exe?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With