List all resolutions of a "secondary" screen (1 Viewer)

Superpat

Member
Local time
Today, 14:53
Joined
Aug 15, 2020
Messages
96
Hello,
I am helped with: http://access.mvps.org/accessfr/apis/api0029.htm
And I made my code :
Code:
Sub lister()
      Dim x As Long
      Dim y As Long
      Dim sSelection As String
      Dim sSelection1 As String
      sSelection1 = ""
      y = 0
      On Error GoTo fin
            For x = 1 To 1000
                sSelection = fEnumDisplay(x)
                If sSelection <> sSelection1 Then
                      Debug.Print sSelection
                      sSelection1 = sSelection
                      y = y + 1
                End If
                x = x + 1
            Next x
fin:
Debug.Print "Nb résolutions proposées : " & y & " et dernier x : " & x
End Sub
It is correct for my first monitor, I want to do the same with the second monitor
Please help, thanks
 

Attachments

  • Monitors_2.accdb
    680 KB · Views: 43
Last edited:

Users who are viewing this thread

Top Bottom