Results 1 to 2 of 2

Thread: getting screen resolution?

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 1999
    Location
    Portugal
    Posts
    2

    Post

    How can i get the current screen resolution in VB 6?
    Do i need to call an API function?
    If so, what is it and how is declared and used?

    Thanks.

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    Try:
    Code:
    Private Sub Command1_Click()
        With Screen
            MsgBox (.Width / .TwipsPerPixelX) & "x" & (.Height / .TwipsPerPixelY)
        End With
    End Sub

    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width