Click to See Complete Forum and Search --> : TwipsPerPixelX


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.

Bill McCarthy
05-27-2001, 02:41 PM
Hi Bob,

just a Beta 1 problem. I believe it has been fixed.


"Bob Butler" <butlerbob@earthlink.net> wrote in message
news:3b1138b2@news.devx.com...
> 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.
>
>
>
>

Bob Butler
05-27-2001, 05:27 PM
"Bill McCarthy" <bill_mcc@iprimus.com.au> wrote in message
news:3b114ae6@news.devx.com...
> Hi Bob,
>
> just a Beta 1 problem. I believe it has been fixed.

Thanks for the info. Given that just about everything is in pixels now and
that most screen resizing code can just be scrapped anyway I hadn't even
tried that one until this morning.