Fix to support modern high DPI displays/laptops on Windows
Posted: Tue Nov 19, 2019 2:02 pm
Hi
Trialling PureBasic and it is unfortunately not usable on modern displays that use a higher than standard DPI for the display. Initially I though it was affecting only the icons which I can live without, but it also makes the properties window and form designer too difficult to use. This is how it appears on a Surface Pro:
Good news
Requires a registry change. This is simple to do, but do at your own risk. Very easy to give yourself problems if you mess it up.
There is a hack that solves it. There's two steps:
1. Edit the registry, in this location:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide
Add a DWORD called PreferExternalManifest and set the value to 1
2. Create a text file called PureBasic.exe.manifest and put it in the same location as the Pure Basic executable.
Edit the contents of the file to:
PureBasic will now display correctly and everything is usable, although a little blurry.
Obviously, only a workaround suitable for your own development. The programs you create will likely have the same problem and may need a similar fix. Searching the forums I can see that this is a common problem. Would hope the developers of PureBasic will support modern displays in Windows.
Trialling PureBasic and it is unfortunately not usable on modern displays that use a higher than standard DPI for the display. Initially I though it was affecting only the icons which I can live without, but it also makes the properties window and form designer too difficult to use. This is how it appears on a Surface Pro:
Good news
Requires a registry change. This is simple to do, but do at your own risk. Very easy to give yourself problems if you mess it up.
There is a hack that solves it. There's two steps:
1. Edit the registry, in this location:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide
Add a DWORD called PreferExternalManifest and set the value to 1
2. Create a text file called PureBasic.exe.manifest and put it in the same location as the Pure Basic executable.
Edit the contents of the file to:
Code: Select all
<?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">
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0" processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*">
</assemblyIdentity>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.VC90.CRT"
version="9.0.21022.8"
processorArchitecture="amd64"
publicKeyToken="1fc8b3b9a1e18e3b">
</assemblyIdentity>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="asInvoker"
uiAccess="false"/>
</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>
Obviously, only a workaround suitable for your own development. The programs you create will likely have the same problem and may need a similar fix. Searching the forums I can see that this is a common problem. Would hope the developers of PureBasic will support modern displays in Windows.