Windows applications: User interface controls too small on high DPI displays

The problem: Controls are too small

You’re running an application on a PC with a high DPI display and some (or all) of the controls are too small. You do not want to change the system-wide scaling settings just to make this application more usable.

The solution: Change the app’s high DPI setting

Windows 10 allows you to change the high DPI settings for each application.

  1. Open the application.
  2. Right-click on the app icon in the taskbar.
  3. Right-click on the app’s name.
  4. Select Properties:
Opening app properties window from the taskbar

If this method does not work, locate the application’s folder and right-click on the application file (.exe), then select Properties.

  1. Select the Compatibility tab.
  2. Click on Change high DPI settings:
Change high DPI settings
  1. Check the Override high DPI scaling behavior checkbox and select a new setting from the drop-down list:
High DPI setting
  1. Confirm both open dialogs with OK.

System” should solve the issue of some controls being smaller than others), though the app will look a bit blurry. “System (enhanced)” will try to make everything look more crisp. You might want to try out all settings (and you may have to restart the app to see any changes).

You can find further information on the settings in this Windows Blog article under “End-user DPI-scaling improvements”.

Finding exported templates in Visual Studio 2019

The problem: Exported project templates do not appear in the “new project” dialog

You’ve exported a project as a template. You’ve made sure that “automatically import the template into Visual studio” was checked:

Still, the template does not appear in the “new project” dialog.

Possible solution

Make sure you’ve not made any selection in the “language”, “platform” or “project type” dropdowns:

After clearing the C# language selection, the export template appears:

In Visual Studio 16.1.4, it was also not possible to enter the name of the template:

However, this seems to have been fixed (works in 16.4.1).

Solution: Your administrator has blocked this application because it potentially poses a security risk to your computer

The Problem: Your administrator has blocked this application…

You’re trying to install a ClickOnce application and get an error message saying: “Your administrator has blocked this application because it potentially poses a security risk to your computer”:
Your administrator has blocked this application because it potentially poses a security risk to your computer

You are the administrator and don’t remember blocking any applications (if you’re not the admin, contact them instead of reading this article).

The reason this is happening

The ClickOnce trust prompt is disabled on your operating system, so instead of a dialog (prompt) which allows you to either proceed with the installation or not, you just get the message above.

The solution

You can change the ClickOnce trust prompt behavior by editing the registry subkeys under:

\HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\.NETFramework\Security\TrustManager\PromptingLevel

There should be five subkeys, one for each security zone:
Registry trustmanager promptinglevel

Each subkey can have one of the following values:

  • Disabled: No trust prompt is shown, instead you get the error message above.
  • Enabled: A trust prompt is shown.
  • AuthenticodeRequired: A trust prompt is shown only for signed applications (other applications cannot be installed).

Trust prompt example

If the application you’re trying to install has been published on the Internet, you’ll want to set the Internet subkey to “Enabled” (or to “AuthenticodeRequired” if the application has been digitally signed). You should then see a trust prompt instead of the “your administrator has blocked this application” error:
Trust Prompt - do you want to install this application

Free Trust Prompt Tool

As an alternative to editing the registry manually, you can also use a free trust prompt tool I wrote:

Trust Prompt Tool

It allows you to easily display and modify the trust prompt configuration.

Notes:

  • If you don’t trust yourself or other people using your PC, you can change the respective zone setting back to “Disabled” after installing the ClickOnce application. The trust prompt configuration has no effect on installed applications and their updates.
  • You could also add the publisher’s site to your trusted sites and only enable trust prompts for the TrustedSites subkey.
  • Are you wondering why all your trust prompt settings have been changed to “Disabled”? Unfortunately, I have no idea. I’ve had this happen on multiple PCs and I’m pretty sure I didn’t do this myself.

Supporting my work and this blog

I am always happy to read nice comments. If you’re feeling generous, you can purchase a PDF version of this article for US$2 by clicking here. Thank you!

This link was added on March 18, 2020 and the total amount after fees received so far is: US$20.61.

Solution: Windows 10 uses two display languages (at once)

When taking screenshots for a tutorial on how to connect a scale to a network, I came across this curious mixture of both English and German in the network adapter settings:Network adapter properties in German and English

I confirmed that the Windows display language was set to English. I tried  deleting the German language pack, but it did not make a difference: my Windows was still bilingual.

Eventually, I found the solution :

  1. Open to the (legacy) Control Panel, click on Clock, Language and Region, then click on Region.
  2. In the Region dialog, select the Administrative tab.
  3. Click on Copy settings…
  4. You’ll probably see that the Display Language under Current User is not the same as the Display Language under Welcome screen:windows welcome screen and user account settings
  5. This can be fixed by checking the Copy your current settings to: Welcome screen and system accounts checkbox, then clicking on OK:
    windows welcome screen and user account settings monolingual

After restarting, the dialog appeared completely in English:network adapter properties in english