PixelsToTwipsX()

  • Thread starter Thread starter Guest
  • Start date Start date
Tim said:
In VB6 we have function PixelsToTwipsX(), what's the equivalent in VB
.NET? Thanks.

Nothing, because there are no twips in VB.NET. It only supports pixels.
 
Tim said:
In VB6 we have function PixelsToTwipsX(), what's the equivalent in VB
.NET? Thanks.

There are no twips anymore, but assuming 1 twip is still 1/1440 inch, the
formula

pixels / g.dpix * 1440

converts pixels to twips, where 'g' is a graphics object. It's available in
OnPaint or the Paint event from the argument e.graphics. Outside these
procedures call thecontrol.creategraphics to get a graphis object (and call
it's dispose method after usage).


--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top