To make your Windows 10 tkinter applications have a pleasant look and feel when running in that environment you’ll have to enable DPI aware, here’s how:

# win10 dpi aware
try:
    from ctypes import windll
    windll.shcore.SetProcessDpiAwareness(1)
    print('Win10 Aware')
except:
    pass

This was a short how-to, but hopefully helpful. We look forward to enriching the content with useful examples.


16 Dec 2019 – HowTo make SoapUI 5.2.1 DPI Aware

Not sure if I should make this a more general post on DPI Aware findings, for now I will …

I’m still running SoapUI v 5.2.1 on my Windows 10 laptop and had forgotten how I set it up to be DPI Aware. More recent versions resolve this problem and won’t require this fix described here.

REM First configure a Registry DWORD here
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide\PreferExternalManifest

REM set DWORD=1
PreferExternalManifest=1

Next create a manifest file in the same directory as SOAP UI.exe called SoapUI-5.2.1.exe.manifest.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
    <description>eclipse</description>
    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
        <security>
            <requestedPrivileges>
                <requestedExecutionLevel xmlns:ms_asmv3="urn:schemas-microsoft-com:asm.v3"
                    level="asInvoker" ms_asmv3:uiAccess="false">
                </requestedExecutionLevel>
            </requestedPrivileges>
        </security>
    </trustInfo>
    <asmv3:application>
        <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
            <ms_windowsSettings:dpiAware xmlns:ms_windowsSettings="http://schemas.microsoft.com/SMI/2005/WindowsSettings">false</ms_windowsSettings:dpiAware>
        </asmv3:windowsSettings>
    </asmv3:application>
</assembly>

That will do the trick, V5.2.1 will become DPI Aware.

Leave a comment

You can comment using your social media account

%d bloggers like this: