Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

twips and pixels

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

916 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