473,320 Members | 2,035 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,320 software developers and data experts.

Convert SizeF to twips

The real reason I ask is, I want to compare the size of a winform label with
the size of a crystal field. Crystal uses twips. What units are used in
winforms? Pixels? Points?

Jeremy
Nov 21 '05 #1
1 3747
winforms in .Net use pixels
There are no twips anymore, but 1 twip is still 1/1440 inch

pixels / g.dpix * 1440

paste this in a form and it will work
Private Function fIntPixToTwips(ByVal intValInPix As Integer) As Integer

Dim g As Graphics = Me.CreateGraphics()

fIntPixToTwips = intValInPix / g.dpix * 1440

g.Dispose()

End Function
happy coding :-)

Michel Posseth


"Jeremy" <je****@ninprodata.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
The real reason I ask is, I want to compare the size of a winform label with the size of a crystal field. Crystal uses twips. What units are used in
winforms? Pixels? Points?

Jeremy

Nov 21 '05 #2

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

Similar topics

4
by: Eric Lilja | last post by:
Hello, I've made a templated class Option (a child of the abstract base class OptionBase) that stores an option name (in the form someoption=) and the value belonging to that option. The value is...
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...
0
by: Robert W. | last post by:
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...
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...
1
by: johnlim20088 | last post by:
Hi, Currently I have 6 web projects located in Visual Source Safe 6.0, as usual, everytime I will open solution file located in my local computer, connected to source safe, then check out/check in...
14
by: Joe | last post by:
this file is drawn in VB.NET and input output goes by XmlSerializer. Therefore, simple output file looks like: <?xml version="1.0" encoding="utf-8"?> <DrawablePicture...
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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.