Very Simple
Tested but not too much
Code: Select all
If OSVersion() >= #PB_OS_Windows_7 And OSVersion() < #PB_OS_Windows_8
Global ScaleX.d = GetDeviceCaps_(GetDC_(0),#LOGPIXELSX) / 96
Global ScaleY.d = GetDeviceCaps_(GetDC_(0),#LOGPIXELSY) / 96
Debug ScaleX.d
Debug ScaleY.d
ElseIf OSVersion() >= #PB_OS_Windows_8
ExamineDesktops()
h.WINDOWPLACEMENT
GetWindowPlacement_(GetDesktopWindow_(),@h)
Global ScaleX.d = DesktopWidth(0) / h\rcNormalPosition\right
Global ScaleY.d = DesktopHeight(0) / h\rcNormalPosition\bottom
Debug ScaleX.d
Debug ScaleY.d
EndIf