Click to See Complete Forum and Search --> : Twips: (96 Pixels <> 1 Inch)


JudsonCaspian
March 21st, 2001, 04:24 PM
According to MSDN there are always 1440 twips per inch. Since the number of pixels in an inch changes when the screen resolution changes, a twip should NOT be equal to a constant number of pixels. However, when I change my screen resolution, Screen.TwipsPerPixelX is still 15. Why does Screen.TwipsPerPixelX always return 15?

The strange thing is that Me.Top is in Twips and dividing Me.Top by 15 actually returns the correct pixel co-ordinate. How is this possible?

Since
(1440 twips / 1 inch)*(1 pixel / 15 twips)
= 96 pixels per inch.

If I'm not missing an important piece of information, that would either mean that there are always 96 pixels per inch, which is clearly not true, or it would mean that MSDN is wrong.

MSDN couldn't be wrong, could it?

shree
March 22nd, 2001, 06:41 AM
There ARE 1440 twips per inch. But you do not measure this inch on the screen. For example, MS Word shows a ruler and you do not go about measuring whether the inch it shows is correct or not.

To see that 1440 twips is an inch, execute the following code and measure it


Printer.ScaleMode = 1 'Twips
Printer.Line (0,0)-(1440,0)
Printer.EndDoc




You can measure the line that is printed and it will be exactly 1 inch long.

If you are interested in seeing Screen.TwipsPerPixelX not equal to 15, set your screen to a size such as 1024x600 where the width to height ratio is not the same as 4:3.

Or in the Display Properties|Settings|Advanced, select a display font other than Small Font. And you'll see.

The important piece of information that you are missing is that "you don't measure inches on the screen."

Andyb
March 24th, 2001, 07:01 AM
Twip

A screen-independent unit used to ensure that placement and proportion of screen elements in your screen application are the same on all display systems. A twip is a unit of screen measurement equal to 1/20 of a printer's point. There are approximately 1440 twips to a logical inch or 567 twips to a logical centimeter (the length of a screen item measuring one inch or one centimeter when printed).