Results 1 to 4 of 4

Thread: Screen height and width

  1. #1
    Guest

    Post

    How do i get the screen height and width?

  2. #2
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    This will return the screen dimensions in pixels
    Code:
    long scrwidth = GetSystemMetrics(SM_CXSCREEN);
    long scrheight = GetSystemMetrics(SM_CYSCREEN);
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  3. #3
    Guest
    Sorry, i meant dos.

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    It depends...here's some useless information:

    Address 0040:0044 contains the width (2 bytes) and total size (another 2 bytes) of the screen buffer.

    But those are 16-bit (*cries* - my book didn't have any 32-bit stuff in it)
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

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