Function PtoPX() As Double
PtoPX = CreateObject("WScript.Shell").RegRead("HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics\AppliedDPI") / 72
End Function
Function dpi() As Double
dpi = CreateObject("WScript.Shell").RegRead("HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics\AppliedDPI")
End Function
Sub test()
MsgBox "Applied DPI " & dpi
MsgBox " coeff ptopx " & PtoPX
End Sub