 |
 |

04-15-2004, 11:25 AM
|
 |
Mexican Coder
|
|
Join Date: Jun 2002
Location: Monterrey, N.L., Mexico
Posts: 2,793
|
|
Pixels to Cm
|
Is there a way to convert Pixels to Centimenters like VB6 ScaleX or ScaleY ??
Thanks
Mike
|
__________________
Mikecrosoft.NET
* If I stop to ask I will stop to learn
* Just I know that I don't know nothing
|

04-20-2004, 07:14 AM
|
|
Newcomer
|
|
Join Date: Mar 2004
Posts: 17
|
|
|
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.
|
|

04-20-2004, 08:30 AM
|
 |
Mexican Coder
|
|
Join Date: Jun 2002
Location: Monterrey, N.L., Mexico
Posts: 2,793
|
|
|
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.NET
* If I stop to ask I will stop to learn
* Just I know that I don't know nothing
|

08-23-2004, 05:43 PM
|
 |
Mexican Coder
|
|
Join Date: Jun 2002
Location: Monterrey, N.L., Mexico
Posts: 2,793
|
|
|
Is there a way to solve this ?????
Thanks
|
__________________
Mikecrosoft.NET
* If I stop to ask I will stop to learn
* Just I know that I don't know nothing
|

08-24-2004, 06:30 AM
|
 |
Fabulous Florist
Forum Leader * Guru *
|
|
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,416
|
|
|
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?
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
|
|
 |
|