CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Screen size

  1. #1
    Join Date
    May 1999
    Posts
    7

    Screen size

    How to get the size of the screen in millimeters.

    Thanks.


  2. #2
    Join Date
    Mar 2000
    Location
    Dublin, Ireland
    Posts
    124

    Re: Screen size

    AlexV,

    In MILLIMETERS?!

    Regards,


    dogBear

    PS Please Rate this Response!!!!

  3. #3
    Join Date
    May 1999
    Posts
    7

    Re: Screen size

    In Visual C++ there is the function GetDeviceCaps returning the following information for the screen:
    HORZSIZE - Width of the physical display (in millimeters);
    VERTSIZE - Height of the physical display (in millimeters).
    HORZRES - Width of the display (in pixels);
    VERTRES - Height of the display (in pixels).
    LOGPIXELSX - Number of pixels per logical inch along the display width.
    LOGPIXELSY - Number of pixels per logical inch along the display height.
    In Java the last four characteristics can be received using methods of a class Toolkit getScreenSize and getScreenResolution.
    Having the first two characteristics it was possible to convert mms in user spaces(pixels) and to draw graphic figures in mms, that is the same size on screens with any resolution.


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

Featured