Page 1 of 1

Scaling...again

Posted: Thu Sep 29, 2022 3:24 am
by jacdelad
Hi,
I'm currently writing a tool which shall run on a Surface-Tablet. These are usually scaled. The following code always returns "100", regardless of the set scaling:

Code: Select all

If ExamineDesktops()
  Debug DesktopUnscaledX(100)
  Debug DesktopUnscaledY(100)
  Debug DesktopScaledX(100)
  Debug DesktopScaledY(100)
EndIf
Shouldn't the values be different? And yes, I activated the "DPI scaling"-function.
Windows 10H2, PureBasic 6.0 ASM.

Re: Scaling...again

Posted: Thu Sep 29, 2022 10:01 am
by Mesa
Could be a stretching function of the monitor, have a look here
viewtopic.php?t=79828

M.

Re: Scaling...again

Posted: Thu Sep 29, 2022 9:22 pm
by jacdelad
Ok, so I tried Ollis code from Mesas link. On my desktop it shows me 1.0 regardless of which scaling I set the desktop. On the surface it shows the correct scaling. BUT, shouldn't the option "DPI awareness" automatically scale alle gadgets and stuff?

Re: Scaling...again

Posted: Thu Sep 29, 2022 10:58 pm
by jacdelad
Oh, btw, I now had to turn of the scaling option, or it wouldn't work on the Surface. Since I scale my gadgets in %-of-screen it works.