Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

twips and pixels

Posted on 1999-01-14
4
Medium Priority
?
831 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 120 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Suggested Courses

670 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