Windows 7 on High DPI

For "ages", monitors had resolution of 96 dpi. Every OS and application was designed with it in mind (usually only tested on that resolution). If you buy LCD screen these days, you will see that everything looks a lot smaller. In order to have fine grained picture, pixel density has gone way up. However, your OS still draws everything like it did for years and your eyes are going mad.

Solution is to change DPI to suit your comfort level (usually 125% (120 dpi) is enough). After restart (log off is enough for Windows 7), everything grows a little bit. Applications that are dpi-aware will scale properly and everything should look fine.

Old applications that are not aware that 96 dpi is out of fashion, will not look so nice. Most common issues will be some controls that went outside of form bounds and text wrapping at weird places. It can happen that just one button you need is unreachable (notice on this picture, there is also cancel button way to the right - outside of window).

In order to solve this issue, Windows Vista will lie to those applications that everything is still in 96 dpi and then manually scale it (Aero is needed - DWM is culprit). Although this will solve problem with unaware applications, it will also make windows blurry (physics of stretching cannot be avoided). This may seem like a pretty good trade until you became aware that application that knew how to scale in Windows XP gets same blurry treatment (e.g. Visual Studio 2008). Windows Vista assumes that all old applications are DPI unaware and it requires application change to behave "just right" (as easiest solution, you can check ignore DPI on compatibility settings).

Reason behind Windows Vista recognizing all old applications as "problematic ones" is that there is new API in place to assure application is capable of scaling. Since that API hasn't been there before Vista, applications will not call it. If they do not call it, Vista will think that they cannot scale. Solution is to get new version. Depending on application, that can pose a problem (e.g. there isn't newer version of Visual Studio 2008 - it doesn't scale even with service pack applied).

This behavior has changed with Windows 7. Microsoft recognized that most of applications know how to scale and even if they cannot, 25% increase (120 dpi is most common) will trim very little of content. Your application will, for all practical purposes, revert to XP high-DPI behavior.

If you decide to go higher than this (e.g. 150%), DWM will kick back in and scaling will take over. Although this will again make windows blurry (for Vista DPI non-aware applications), it will also make everything fit.

Since DPI settings higher than 120 dpi are not so common, I find this a worthy compromise.

One thought to “Windows 7 on High DPI”

  1. It is really really buggy. Not sure whether this is a NVidia fault or an MS one. Its almost unusable at 150% because windows flicker as seen in the video:

    I have reported this to MS and NVidia and non one wants to know, especially steven sinofsky (who I emailed).

    I work on a projector so the whole experience is dreadful in Win 7, but they do not allow you to submit bug reports!

Leave a Reply

Your email address will not be published. Required fields are marked *