Bob Butler
05-27-2001, 01:32 PM
I was asked how to convert code that uses the VB6 TwipsPerPixelX and Y
functions and ran into something that I don't see mentioned in the
archives.... While I realize that the functions can be eliminated in most
cases since the Screen object returns pixels now instead of twips I find
that the beta 1 functions are wrong. For example:
messagebox.Show(Microsoft.VisualBasic.Compatibility.VB6.TwipsPerPixelX.ToStr
ing, "TPPX")
displays "96" instead of "15" as I'd expect. I'm assuming it's giving me
pixels per inch so 1440/96 gives me the number I want but I'm curious if
this is a known beta 1 bug.
functions and ran into something that I don't see mentioned in the
archives.... While I realize that the functions can be eliminated in most
cases since the Screen object returns pixels now instead of twips I find
that the beta 1 functions are wrong. For example:
messagebox.Show(Microsoft.VisualBasic.Compatibility.VB6.TwipsPerPixelX.ToStr
ing, "TPPX")
displays "96" instead of "15" as I'd expect. I'm assuming it's giving me
pixels per inch so 1440/96 gives me the number I want but I'm curious if
this is a known beta 1 bug.