I've been encountering this issue ever since I bought this laptop with 4k display in 2015. With a lot of effort I managed to work around the issue but I'm growing tired of it. VS2017 is supposedly DPI aware hence I do not expect any issues when creating a simple MDI Parent Form and running the app. But to my frustration the icons in the toolStrip (just the standard one in the MDI parent form) are scaled horribly. When I create a form with a button on it which looks just fine in Visual Studio 2017 designer and I run the app and load the form, the button text isn't completely shown. My display settings are as follows:
I've tried to find solutions, but the only workable thing I could find was setting my visual studio designer to dpi-unaware via registry (link here)
Help anyone?
Update When I add a new MDI form with the setting of DPI-awareness OFF, everything looks OK except Visual Studio itself (blurry).
There are three options to resolve the display problem: Restart Visual Studio as a DPI-unaware process. Add a registry entry. Set your display scaling setting to 100%
To work around scaling issues, try the following methods: Log out and in Log out and log back in to the system. This improves how applications and elements are displayed when the monitor configuration changes. Select Display > Change the size of text, apps, and other items, and then adjust the slider for each monitor.
I have similar problem when working with Windows Forms (Windows Forms Designer) on Visual Studio 2017, but I think it would be the same on Visual Studio 2019.
From Microsoft documentation here, there is a tip to disable the scaling/DPI aware feature.
If you prefer to manage settings from the command line,
devenv.exe
takes/noscale
as a command-line parameter to run in 100% scaling mode.
So, basically, I just created a shortcut on the Desktop to Visual Studio (devenv.exe
) and added the parameter /noscale
on the shortcut Target field like so:
"...\path\to\IDE\devenv.exe" /noscale
So, everytime Visual Studio is started through the shortcut, it will always start with 100% scaling mode. If you use high resolution screen (high-dpi) screen, you will notice that the Visual Studio text will appear a little bit blurry because of this.
You should change the settings so there won't be a difference when the program runs on different machines. Go to the project's properties page, then to Manifest Tool and then Input and Output. Change the DPI awareness to 'none'
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