How to get the size of the screen in millimeters.
Thanks.
Printable View
How to get the size of the screen in millimeters.
Thanks.
AlexV,
In MILLIMETERS?!
Regards,
dogBear
PS Please Rate this Response!!!!
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.