Pixels to Cm

Mikecrosoft
04-15-2004, 11:25 AM
Is there a way to convert Pixels to Centimenters like VB6 ScaleX or ScaleY ??

Thanks

Mike

bilmks
04-20-2004, 07:14 AM
What do you mean? cm on the screen? If i use a 17'' monitor with 1024 x 768 resolution 1 cm = 1024/32 = 32 pixels (a 17'' mon. is 32 cm wide). With the same monitor and 800 x 600 res. 1 cm = 800/32 = 25 pixels.

Mikecrosoft
04-20-2004, 08:30 AM
I need to convert pixels to Cm, but I will use this to print a report, due a Spreadsheet that uses the Pixels as measure unit and I need to expres that size in CM in the printed report (Columns width in the paper).

Mikecrosoft
08-23-2004, 05:43 PM
Is there a way to solve this ?????

Thanks

AtmaWeapon
08-24-2004, 06:30 AM
Now I just happened to be reading the chapter on pages and transforms in Charles Petzold's Programming Windows with VB.NET, and it does have this.

According to him, printer coordinates are always in units of 0.01 inch, for whatever reason.

The example program I'm looking at draws a 10-cm ruler on the screen, and apparently will print one too. I think this should give you a good idea how to do it. It's too much to type before heading off to work, but I'll try to attach the files he used for it.

Why is .bas a valid file attachment but .vb isn't?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum