473,327 Members | 2,112 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Pixels vs. Twips

I'm building a simple Windows Form with tabs at the top. I'm writing some
code to ensure that each tab will be wide enough to accomodate the text that
will go in it - for both English and other languages.

So I used the MeasureString method to figure out the width of the text.
This came back in pixels. Fine. But then I went to the TabPage object to
get its width. To my great surprise the width value was in Twips, even
though articles like this say this isn't so
http://msdn.microsoft.com/library/de...albasicnet.asp

From previous experience in VB6 I've learned that one cannot always depend
upon 1 Pixel = 15 Twips. On some screen resolutions I've seen 1:12.

So, I'm wondering if the TabPage.Width value is a known bug in .Net and if
there's a workaround that anyone knows of.

Sincerely,

Robert W.
Vancouver, BC

Nov 17 '05 #1
0 2927

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Joop | last post by:
Hi, When I create a text field on a report with a 8 point font in it and let Access decide the size, the height wil become 0.423 cm. This comes down to 240 twips wich is 12 points. My...
1
by: cefrancke | last post by:
I've been working with the Twips/Pixel issue and after reviewing the Acc.Dev.Hnd book and the groups, the standard seems to be ... 640x480 15 Twips/Pixel 800x600 12 Twips/Pixel 1024x768 12...
1
by: Sachin | last post by:
Hi If we check Font.Height property it returns the value in pixel. How to convert the same in Twips? please guide -- sachin
0
by: Sachin | last post by:
How to convert GraphicsUnit .Word to Twips? -- sachin
6
by: Craig Parsons | last post by:
Folks, I have an image of a circle, which I am trying to straighten out into a flat line. I am essentially wanting to look at the image, and read a straight line from the centre, and then plot...
22
by: liups | last post by:
Hi, I just come across this, how can I make a form's height larger than 780 pixels? Thank you.
2
by: Ricardo Furtado | last post by:
I'm programming in visual basic .net and i need to determine the size, in millimeters, of some lines on a picturebox (determined by points). i've been searching in google but i found nothing except...
4
by: perspolis | last post by:
Hi all I have some points in twips measurement.how can I convert them to pixel measurement ? thanks
1
by: juanhernandez | last post by:
Iam printing a special form using vb6 report designer. In which I am printing 25 totals on the right side on the form. My totals take a whole standard letter page size. The last amount (total) which...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.