This is what I found
Option Compare Database
Option Explicit
Private Const LOGPIXELSX As Long = 88
Private Declare Function GetDeviceCaps Lib "gdi32.dll" ( _
ByVal hdc As Long, _
ByVal nIndex As Long) As Long
Private Declare Function GetDC Lib "user32.dll" ( _
ByVal hwnd As Long) As Long
Declare Function ReleaseDC Lib "user32.dll" ( _
ByVal hwnd As Long, _
ByVal hdc As Long) As Long
Public Function GetDpi() As Long
Dim hdcScreen As Long
Dim iDPI As Long
iDPI = -1
hdcScreen = GetDC(0)
If (hdcScreen) Then
iDPI = GetDeviceCaps(hdcScreen, LOGPIXELSX)
ReleaseDC 0, hdcScreen
End If
GetDpi = iDPI
End Function
This seems to return 96 if the setting is 100% and then the Scaling Setting * 96 for higher levels.
For example if the scaling setting is set to 125%, this function returns 120.
I should be able to use this to determine the ScalingMultiplier that needs to be applied to all column width settings
I tested this on my desktop machine as well as a SurfacePro4 and it seemed to be consistent.
Imran