Visual Studio WinForms Designer on HighDPI

Visual Studio (2015 and upcoming 2017) is a “DPI aware” application. Even our own WinForms based product Royal TS is a “DPI aware” application. But if you are a WinForms developer and use Visual Studio on a high DPI system, you will be surprised how Visual Studio messes up all your WinForms in the designer.

The problem is that Visual Studio is DPI aware but unlike Royal TS, for example, it seemingly cannot run with “display scaling” enabled (display scaling means, the process will be rendered/scaled as it would on a 96 DPI screen).

There are a couple of ways to enable/disable display scaling:

  • The Compatibility tab in the .exe file properties dialog
  • A .exe.manifest file with true|false
  • A Win32 API call SetProcessDPIAware() when the process starts

My MVP fellow Carlos Quintero wrote a great blog post a while back with lots of references.

The main problem with Visual Studio is, the devenv.exe.manifest file is embedded in the executable and therefore the DPI awareness is enforced and cannot be overridden using the above methods.


It is possible to set DPI awareness for a specific application in the registry if you want to make Visual Studio System DPI “unaware”:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionImage File Execution Optionsdevenv.exe]

The above way is kind of “undocumented”. I did some research but couldn’t find any proper documentation about the dpiAwareness REG_DWORD in the Image File Execution Options key. Setting the REG_DWORD to 1 will make Visual Studio DPI aware again (requires a restart of Visual Studio).

Note: when Visual Studio is DPI “unaware” and display scaling is in effect, fonts and icons may look blurry but the WinForms designer will have no unwanted side-effects.

Attached you will find two .reg files which allows you to quickly switch display scaling on and off for Visual Studio (devenv.exe): Download

Thanks to Microsoft (Tanya) and to Carlos Quintero for helping me with this!

29 thoughts on “Visual Studio WinForms Designer on HighDPI

  1. Hello, you saved my day! This trick will save me a lot of time, uselessly spent of switching between windows users with high and normal DPI. Thank you!

    1. Hi Edward,

      I haven’t tested it with Windows 8.1 so I can’t really tell. Unfortunately there’s no documentation (at least I couldn’t find any) about this flag. Since Windows 10 has a lot of changes and improvement around handling high DPI, there’s a good chance that this will only work on Windows 10.


  2. Thank you so very much! I was nearly going to throw my Surface Pro 4 through the window!

  3. Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you so very much! I was nearly going to throw my Macbook Pro through the window!

  4. Thank you very much. I ignored my M3800 laptop for a year since Visual Studio messed up the GUI. I searched for different solution but doesn’t work. You trick helps.

  5. Fantastic – thanks! Saved so much time. Worked for me on an app continuously developed since 2006 (VB2005) and now being developed in VS 2017 Community on a Workstation Specialists M Series laptop running Win 10 with a 3840×2160 monitor scaled at 150%

  6. Worked for me also with a High DPI screen laptop (3840 X 2160) set to scalling factor of 200%. Now if I could just make my C++ (unmanaged) application to be High DPI aware.

  7. Thanks, that works great.
    Are there news about the topic especially with Framework 4.7.1?
    The blured fonts are not so nice 😉

  8. These twists suck the life out of us developers. I cannot thank you enough for this extraordinary fix.

  9. Awesome fix, thank you! It worked for VS2012 Ultimate running under Windows10 running on an HP laptop.

  10. Sure glad this was still up and available. My system at home has dual GTX-1080’s in SLI on 3 – 4K 28″ Samsung monitors. My system at work is a docked HP portable Workstation (laptop) with 2 – 1080P monitors. This was driving me nuts, as I couldn’t bring things home to work on them unless I brought my laptop (and used it’s 15″ built-in). Thanks for the solution and research. I was about to give up! Microsoft should definitely allow users the ability to TOGGLE this in the IDE!

  11. Just found this. Very many thanks. previously on my Surface 4 I was setting scaling to 100%, restarting and then resetting the scaling to 200%. This worked but was a faf. Your registry editions make it so much easier (especially as I only use winforms).

  12. I’ve been looking for this solution for two years… literally… Thank you so much!

  13. Many thanks. I’ve been going crazy trying to figure out what was going wrong. This was the fix!

  14. Thank you! Works in Visual Studio Professional 2015 with 4K monitor with resolution set at 3840 x 2160 with 200% scaling.

Leave a Reply