Xtreme Visual Basic Talk

Xtreme Visual Basic Talk (http://www.xtremevbtalk.com/index.php)
-   .NET Interface and Graphics (http://www.xtremevbtalk.com/forumdisplay.php?f=108)
-   -   Pixels to Cm (http://www.xtremevbtalk.com/showthread.php?t=161050)

Mikecrosoft 04-15-2004 11:25 AM

Pixels to Cm
 
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

2 Attachment(s)
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?


All times are GMT -6. The time now is 03:50 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
All site content is protected by the Digital Millenium Act of 1998. Copyright©2001-2011 MAS Media Inc. and Extreme Visual Basic Forum. All rights reserved.
You may not copy or reproduce any portion of this site without written consent.