Determining DPI of user's monitor

  • Thread starter Thread starter cinnie
  • Start date Start date
C

cinnie

greetings


from within Access code, how can I determine the DPI setting of the user's
computer? (the value found in Control Panel/Display/Settings/Advanced/DPI
setting)
 
This should get the user's screen resolution:

Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As
Long

Public Sub GetScreenRez()

Const X_FULL_SCREEN = 16
Const Y_FULL_SCREEN = 17

Dim lngX As Long
Dim lngY As Long

lngX = GetSystemMetrics(X_FULL_SCREEN)
lngY = GetSystemMetrics(Y_FULL_SCREEN)

Debug.Print "Screen Resolution = " & lngX & " x " & lngY

End Sub
 
Back
Top