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
 
Back
Top