Results 1 to 4 of 4

Thread: get screen res?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Location
    England
    Posts
    242

    get screen res?

    What code do i use to get what the current screen resolution is?
    Lpeek

  2. #2
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429
    Try:
    VB Code:
    1. MsgBox "Current Resolution is : " & Screen.Width / Screen.TwipsPerPixelX & " X " & Screen.Height / Screen.TwipsPerPixelY

  3. #3
    Hyperactive Member
    Join Date
    Aug 2003
    Location
    Wigan, UK
    Posts
    291
    just about to post, then brucefox did. anyway.

    VB Code:
    1. Dim x As Integer, y As Integer
    2. x = Screen.width / Screen.TwipsPerPixelX
    3. y = Screen.Height / Screen.TwipsPerPixelY
    4. MsgBox Str(x) & "," & Str(y)

    thingimijig.

  4. #4
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429
    Point: No need to waste memory by defining (in this case) 2 Integers when you dont need them


    (And they should be Single Data Types too)


    Bruce.

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