Solved

twips and pixels

Posted on 1999-01-14
4
816 Views
Last Modified: 2008-02-01
1. The help file said that twip is independent on the screen while pixel is dependent. I did a test: change the screen resolusion for the same application. For a full screen form width, both the twips and pixels were changed (both are dependet to scree?) although the rate of twips to pixel was remained to 15.
2. If we set a form's width = 9600 twips, in different computers it will remain 9600 twips and 640 pixels...I must misunderstood something!
0
Comment
Question by:learn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 10

Accepted Solution

by:
caraf_g earned 40 total points
ID: 1456315
Different screens have different values for Twips Per Pixel.

There are two values available in every VB program to find out what the actual Twips Per Pixel values are.

Screen.TwipsPerPixelX gives you the horizontal number of Twips Per Pixel
Screen.TwipsPerPixelY gives you the vertical one.

Depending on these values, the form will have different widths in pixels.

If your form is 1500 Twips wide, and your screen's TwipsPerPixelX value is 15, the form will be 100 pixels wide.

On another monitor, however, the TwipsPerPixelX value could be 12.

On that monitor, the same form with a width of 1500 twips will be 1500/12 = 125 pixels wide.
0
 

Author Comment

by:learn
ID: 1456316
But why twip is screen independent?
0
 
LVL 3

Expert Comment

by:vikiing
ID: 1456317
>But why twip is screen independent?

"Twip" stands for "Twentieth of one printer's point". There are approx. 1440 twips in a logical inch, or 567 twips in a logical centimeter; that's the length of a piece of screen measuring one inch or one centimeter when it is printed.

0
 

Author Comment

by:learn
ID: 1456318
Hi vikiing

Do you mean in any computer and any printer, we always print out one point in the printer from 20 twips in the computer?
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question