Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to convert PB Units/ Pixels to Inches??

3,141 views
Skip to first unread message

Jenny

unread,
May 28, 2009, 3:07:36 AM5/28/09
to
How to convert PB Units/ Pixels to Inches??


Hi all

My PB application send information to RDLC report
application and here I am facing some problems to converts
Units/ Pixels to Inches because RDLC report is not able to
understand then Units/ Pixels

I have formula to convert PB Units into Pixels.

For X and Width = Units / 4.571429

For Y and Height = Units / 4

I am looking for formula to convert PB Units/Pixels to
Inches.

Scott Morris

unread,
May 28, 2009, 8:08:23 AM5/28/09
to
<Jenny> wrote in message news:4a1e3838.18c...@sybase.com...

> How to convert PB Units/ Pixels to Inches??
>
>
> Hi all
>
> My PB application send information to RDLC report
> application and here I am facing some problems to converts
> Units/ Pixels to Inches because RDLC report is not able to
> understand then Units/ Pixels
>
> I have formula to convert PB Units into Pixels.
>
> For X and Width = Units / 4.571429
>
> For Y and Height = Units / 4

How about using pixelstounits() and unitstopixels() ?

>
>
>
> I am looking for formula to convert PB Units/Pixels to
> Inches.

You will need to go to the API - which may be daunting
http://social.msdn.microsoft.com/Search/en-US/?query=convert%20pixels%20to%20inches&ac=2
http://msdn.microsoft.com/en-us/library/dd144877(VS.85).aspx


Roland Smith [TeamSybase]

unread,
May 28, 2009, 10:22:54 AM5/28/09
to
Use the PixelsToUnits function to convert from units to pixels. Windows
claims that the screen is 96 DPI ( dots per inch ). I found this formula
which should be more accurate.

One way to figure out your DPI is to use some math.

W = Width in Pixels

H = Height in Pixels

S = Diagonal Size in Inches

SQRT(W^2 + H^2) / S

SQRT(1280^2 + 1024^2) / 17 = 96.42 DPI


"Scott Morris" <bo...@bogus.com> wrote in message
news:4a1e7eb7$1@forums-1-dub...

Roland Smith [TeamSybase]

unread,
May 28, 2009, 10:35:45 AM5/28/09
to
Use the PixelsToUnits function to convert from units to pixels. Windows
claims that the screen is 96 DPI ( dots per inch ). I found this formula
which should be more accurate.

One way to figure out your DPI is to use some math.

W = Width in Pixels

H = Height in Pixels

S = Diagonal Size in Inches

SQRT(W^2 + H^2) / S

SQRT(1280^2 + 1024^2) / 17 = 96.42 DPI


"Scott Morris" <bo...@bogus.com> wrote in message
news:4a1e7eb7$1@forums-1-dub...

Terry Voth [TeamSybase]

unread,
May 28, 2009, 10:57:34 PM5/28/09
to
Assuming we're talking about DataWindows (inches don't mean anything
outside the printed page, at least physical inches), why not just
change the DataWindow's units to 1/1000 inch (first tab on the overall
DataWindow's properties) and be done with it? Let PB do the work for
you.

Good luck,

Terry and Sequel the techno-kitten

*********************************
Build your vocabulary while feeding the hungry
http://www.freerice.com
*********************************
Newsgroup User Manual
=====================
TeamSybase <> Sybase employee
Forums = Peer-to-peer
Forums <> Communication with Sybase
IsNull (AnswerTo (Posting)) can return TRUE
Forums.Moderated = TRUE, so behave or be deleted
*********************************

Sequel's Sandbox: http://www.techno-kitten.com
Home of PBL Peeper, a free PowerBuilder Developer's Toolkit.
Version 4.0.4 now available at the Sandbox
PB Futures updated June 25/2008
See the PB Troubleshooting & Migration Guides at the Sandbox
^ ^
o o
=*=

0 new messages