After upgrading to Windows 10 my Visual Studio 2013 forms, when running, appear blurry and in a different style than what Visual Studio 2013 pictures it in design mode.
I tried installing Visual Studio 2015 and the blurry effects are still the same.
Also there are many other changes such as the elimination of 3D buttons.
Turn the setting for fixing blurry apps on or off manuallyIn the search box on the taskbar, type advanced scaling settings and select Fix apps that are blurry. In Fix scaling for apps, turn on or off Let Windows try to fix apps so they're not blurry.
Adjust DPI Scaling Blurry text might be the result of incorrect global text scaling settings. Windows attempts to scale your text so that it remains readable on high-resolution displays. For example, if you're using a 27” 4K display, the text would be almost unreadable without 20/20 vision.
Some apps appear blurry because you're using a high resolution on your screen. In this case, you can lower your resolution and see whether that fixes the problem. If this doesn't fix the issue, you can easily revert back to the old resolution.
Blurry font problems can be caused by cables that aren't connected properly, older monitors, and poor screen resolution settings.
Call external functions to set it across your entire application. It doesn't get any easier than this:
[STAThread]
static void Main()
{
**SetProcessDPIAware();** //THIS
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
//ADD THESE TWO LINES !!
[System.Runtime.InteropServices.DllImport("user32.dll")]
private static extern bool SetProcessDPIAware();
Apparently this problem started with Windows 8, which I avoided like the plague.
This is the solution I found:
Add a manifest by going to to Project > Add New Item > Application Manifest File
.
For Visual Studio 2015 and above, you can simply uncomment this code:
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings>
</application>
In older versions of Visual Studio, you need to add this code yourself as it won't be in the manifest automatically.
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