1. Rajesh Kanna
  2. PowerBuilder
  3. Friday, 30 August 2024 07:18 AM UTC

Hi Team,

Good day!

I would like to know how to get monitor's current scale value applied (150% or 125% or 175% or 100%).

So that i will resize the length of the window based on current scale value.

 

Appreciate if anyone provide insight on this.

 

Thanks

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Monday, 2 September 2024 09:16 AM UTC
  2. PowerBuilder
  3. # 1

https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/dpi-related-apis-and-registry-settings?view=windows-11

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 3 September 2024 16:56 PM UTC
  2. PowerBuilder
  3. # 2

Hi Rajesh  ;

  I would suggest trying the "GetDpiForMonitor" MS-Windows API ...

https://learn.microsoft.com/en-us/windows/win32/api/shellscalingapi/nf-shellscalingapi-getdpiformonitor

HTH

Regards .. Chris

Comment
  1. John Fauss
  2. Tuesday, 3 September 2024 17:21 PM UTC
As mentioned in the Remarks section of the documentation at this link, a DPI unaware app will always return the default system values of X=96 dpi and Y=96 dpi (100% X/Y scaling).
  1. Helpful
There are no comments made yet.
Rajesh Kanna Accepted Answer Pending Moderation
  1. Tuesday, 3 September 2024 17:01 PM UTC
  2. PowerBuilder
  3. # 3

Thanks Chris!  I will skim through the link and try out.

Regards,

Rajesh

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.