G
Guest
I have found many articles on the web about the use of GetSystemMetrics(n)
to determine the screen resolution by using n=0 and n=1. However, running
the code:
Declare Function GetSystemMetrics32 Lib "user32" _
Alias "GetSystemMetrics" (ByVal nIndex As Long) As Long
Sub x()
Dim i As Long
For i = 1 To 300
Range("A" & i) = i - 1
Range("B" & i) = GetSystemMetrics32(i - 1)
Next i
End Sub
Seems to be giving meaningful values for n=0-84. All n>84 return 0.
I found that n=80 gives the number of monitors.
Is there a list of all meaningful values of n? (I haven't been able to
find one.)
Many thanks.
to determine the screen resolution by using n=0 and n=1. However, running
the code:
Declare Function GetSystemMetrics32 Lib "user32" _
Alias "GetSystemMetrics" (ByVal nIndex As Long) As Long
Sub x()
Dim i As Long
For i = 1 To 300
Range("A" & i) = i - 1
Range("B" & i) = GetSystemMetrics32(i - 1)
Next i
End Sub
Seems to be giving meaningful values for n=0-84. All n>84 return 0.
I found that n=80 gives the number of monitors.
Is there a list of all meaningful values of n? (I haven't been able to
find one.)
Many thanks.