# How to force high-dpi scaling

accessibilitycompatibilitydpihigh-dpi

How can i force an application to be high-dpi scaled?

• Pretend there is an application, who's developers manifested it as high-dpi aware, when it really isn't. How can i force dpi-scaling?

• Pretend there is an applicaiton that Microsoft has applied the "HighDpiAware" compatiblity shim, when the application really isn't. How can i force dpi-scaling?

How can i force Windows to apply dpi-scaling to an application?

## Edit: What is high-dpi scaling?

Not all users run Windows at 96dpi. Not every button is supposed to be 75×23 pixels, not every toolbar is 25pixels high, and not every treeview glyph is 16×16. If the user has chosen a different dpi setting for Windows, you need to scale everything appropriately.

Problem is that almost no developers do their job by handling high-dpi settings nicely. At best everything will stay "the same size", which means that every appears teeny tiny. At worst forms are incorrectly laid out, with text being clipped, and controls not visible.

Starting with Windows Vista, and leveraging the power of Desktop Composition, Microsoft gave up on developers doing their job, and now lie to application. They tell apps that the user is running at 96dpi. Windows then uses the video card, and Desktop Composition, to scale up the forms.

Pro: the form's content will be a nice readable size.
Con: everything will be slightly fuzzy.

This "high-dpi scaling" feature only works at the user's discretion, and requires:

• Desktop Composition to be enabled
• the user to turn off "Use Windows XP style scaling"
• the user to not disable scaling for your application

As a developer, you can opt out of the high-dpi scaling; if you took the effort to write your application properly, and you know that you'll handle high-dpi properly. You opt out of this scaling by adding a manifest entry to your executable, declaring that you are "high-dpi aware".

The topic of how to make your application respect the user's preferences (including font face, font size, and dpi setting) is a question for stack overflow. As is the syntax for the manifest entry declaring your "high-dpi awareness".

This question, on super-user, is how to ignore a developer who went ahead and added a high-dpi aware manifest entry, when in fact the application isn't high-dpi aware. They told Windows to disable scaling, but they didn't actually test the application. There is software out there with a "high-dpi aware" manifest entry, and now the application is unusable under "large fonts" (e.g. 120dpi).

Edit: Note that it should be possible to simply place the manifest next to the executable, e.g. for foo.exe, you would place the manifest in foo.exe.manifest. See MSDN article (look in the section called "File Name Syntax").