1. John Barrett
  2. PowerBuilder
  3. Friday, 29 January 2021 02:03 AM UTC

We have a number of PB2017 R3 apps, which are currently deployed on Windows 8.1 laptops.

We are testing them on Windows 10.  Many windows (especially response windows, but also standard MessageBox calls) are missing the right and/or bottom borders.  For example, attachment MessageBox1.png.

On Windows 8.1, it looks like attachment MessageBox2.png.

Any ideas?

Attachments (2)
Accepted Answer
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 29 January 2021 02:37 AM UTC
  2. PowerBuilder
  3. # Permalink

I found this, haven't tried it myself yet, but seems like an interesting alternative:

https://www.tenforums.com/tutorials/7935-install-aerolite-theme-windows-10-a.html

regards

Comment
There are no comments made yet.
John Barrett Accepted Answer Pending Moderation
  1. Tuesday, 2 February 2021 03:19 AM UTC
  2. PowerBuilder
  3. # 1

Hi Miguel,

I tried both your suggestions.  The “Show shadows under windows” and “Choose accent colour” ideas work well.  The AeroLite theme is even better: borders are clearly visible.  Our clients will be able choose either option, which they can implement without Admin rights.

We will also try Arthur's suggestion (add a section to the manifest file) when we next do a test build.

Thanks for you help,

John

 

Comment
  1. Miguel Leeuwe
  2. Tuesday, 2 February 2021 06:48 AM UTC
That's great news.

I've tried Arthur's suggestion and he's very right. if I'm on scaling of 100% I can see a very thing border (and thanks to having set the colour in windows setup). Once you go to 125 %, the right and lower border don't show any more. So it is a windows problem probably. Setting the shadow though makes the outline of the window look a lot less ugly, so in my opinion that would be the best solution. The theme indeed also works well.
  1. Helpful
  1. Miguel Leeuwe
  2. Tuesday, 2 February 2021 06:50 AM UTC
I tried Arthur's solution with the manifest, but since we are using PFCs the resizing of objects looked "not well" when applying the theme, so I ended up not using it.
  1. Helpful
There are no comments made yet.
Arthur Hefti Accepted Answer Pending Moderation
  1. Friday, 29 January 2021 06:23 AM UTC
  2. PowerBuilder
  3. # 2

Hi

we have this behaviour when the DPI settings of the screen are e.g. 125%. Windows doesn't know if your application is DPI aware and does a bitmap scale. You can set the DPI awareness of your application by an API call (not recommended) or through a manifest file. The file should be named <applicationame>.exe.manifest. To test this you can choose "External Manifest" in the security tab when generating the exe and past the content below into the generated manifest file:

 

<?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">
  <asmv3:application>
    <asmv3:windowsSettings>
      <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
      <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
    </asmv3:windowsSettings>
  </asmv3:application>
</assembly>

For details: https://docs.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows?redirectedfrom=MSDN

The api call incl. definition is below and has to be set before the first window is drawn e.g. in the application open event. Therefore you won't see any effect when running from the PB ide.

function ulong SetProcessDpiAwareness( ulong value ) library "Shcore.dll"

SetProcessDpiAwareness(2)

The API is available from Windows 8.1 and Windows Server 2012 R2 (to be considered when your application runs on Citrix)

Regards
Arthur

Comment
  1. Arthur Hefti
  2. Friday, 29 January 2021 09:21 AM UTC
The drawback is that you have to do some scaling/resizing yourself (if possible).
  1. Helpful
  1. Miguel Leeuwe
  2. Friday, 29 January 2021 09:53 AM UTC
Hi Arthur,

Amazing! Yes it fixes the (very thin) border problem, at least it shows on 125% with the manifest and without it doesn't. But ..... it s*rews with the PFC resizing service, so for me that's worse than not seeing the border. If you apply shadows, then it still looks ok even without the manifest

  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 29 January 2021 02:31 AM UTC
  2. PowerBuilder
  3. # 3

Welcome to windows 10 ! I hate it too how windows is becoming less and less user friendly. Before you would see a title bar, now you don't know where it begins and ends as it's by default white. You can drag a window by clicking on a title bar, you can double click on it to maximise minimise, but now you have the be a pre-windows 10 user to know it even exists and guess where it starts and ends. Let me stop because I can go on and on about other features no longer very visible.

To see something similar to a border, do the following:

Hit the Windows key (the one with the windows logo) on your keyboard and start typing "appearance .."

Then click on "Adjust the appearance and performance of windows"

Then in the following window choose "adjust for best appearance":
(I think it's the "Show shadows under windows" does the trick). So now your modal windows will at least 'appear' to have something similar to a border.

 

Another thing you might want to do is the next step:

Hit the windows key and start typing "choose your accent colour" (UK) or "choose your accent color" (US?).
When you run that program, on window that I show below, do not choose "automatically pick an accent colour from my background" since then the title / border colour might be the same as your background". 
Pick a colour yourself (you can see I chose "Pale moss"). Then mark "Title bars and window borders" (shown all the way down on the following image:

 

 

 

 

 

At least your powerbuilder response windows will look a bit better, even though a lot of dialogs of windows 10 itself will ignore your settings.

Regards,

MiguelL

 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.