Click to See Complete Forum and Search --> : Screen size


AlexV
September 18th, 2000, 09:34 AM
How to get the size of the screen in millimeters.

Thanks.

dogbear
September 19th, 2000, 05:11 AM
AlexV,

In MILLIMETERS?!

Regards,


dogBear

PS Please Rate this Response!!!!

AlexV
September 19th, 2000, 06:41 AM
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.