It is currently Sat Dec 07, 2019 7:52 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Fix to support modern high DPI displays/laptops on Windows
PostPosted: Tue Nov 19, 2019 2:02 pm 
Offline
New User
New User

Joined: Tue Nov 19, 2019 11:17 am
Posts: 4
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:

Image

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:
<?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>


PureBasic will now display correctly and everything is usable, although a little blurry.

Image

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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Fix to support modern high DPI displays/laptops on Windo
PostPosted: Tue Nov 19, 2019 9:55 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Apr 18, 2019 8:17 am
Posts: 429
Thanks for this info; but rather than edit the Registry, can you try changing the compatibility settings for the exe to "Override high DPI scaling behavior –> System (Enhanced)" or one of the other DPI settings offered there? Should do the same thing for just that exe alone, without having to apply a global Registry change and creating a manifest file. I don't have a Surface Pro to test.

Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Fix to support modern high DPI displays/laptops on Windo
PostPosted: Tue Nov 19, 2019 11:49 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Apr 26, 2003 2:49 pm
Posts: 634
The IDE is no longer DPI aware in 5.71, it was in 5.70 at least in Windows 7.
Maybe they screwed up the manifest?
I reported the bug here:
https://1/english/viewtopic.php?f=4&t=73895
But no one replied.
Fonts are really small on a 1080p 15" on a 4K 15" will be impossible to read.


Top
 Profile  
Reply with quote  
 Post subject: Re: Fix to support modern high DPI displays/laptops on Windo
PostPosted: Wed Nov 20, 2019 12:46 am 
Offline
New User
New User

Joined: Tue Nov 19, 2019 11:17 am
Posts: 4
BarryG wrote:
Thanks for this info; but rather than edit the Registry, can you try changing the compatibility settings for the exe to "Override high DPI scaling behavior –> System (Enhanced)" or one of the other DPI settings offered there? Should do the same thing for just that exe alone, without having to apply a global Registry change and creating a manifest file. I don't have a Surface Pro to test.

Image

Had already tried that without success. Seemed to have no effect.


Top
 Profile  
Reply with quote  
 Post subject: Re: Fix to support modern high DPI displays/laptops on Windo
PostPosted: Wed Nov 20, 2019 12:49 am 
Offline
New User
New User

Joined: Tue Nov 19, 2019 11:17 am
Posts: 4
Btw, the registry part just enabled external manifests, Windows will look for a file with a matching name. I’ve had to use this to fix a slightly older version of photoshop.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye