Results 1 to 2 of 2

Thread: Height = CM instead of Pixels

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2007
    Posts
    35

    Height = CM instead of Pixels

    Hey there, I'm using code to print out a document which is a CD Cover, now I've found that the code I'm using is basically working off Pixel dimensions which I can't afford to use, I'm wanting to use 12.1cm like so.

    Code:
                Dim rect As RectangleF
                rect = e.Graphics.VisibleClipBounds()
                rect.Height = 12.1
                rect.Width = 12.1
    But obviously you can tell what it's gonna do, it prints a tiny square of it . Now does anybody know how to make it so I can use CM instead of Pixel dimensions, I'd give it a shot but I'm crap at coding math, I figured I might give this a go
    Code:
    12.1 * 567
    But sadly, that printed one huge image of it and I didn't want that. So does anybody know how to use Cm's instead of Pixels?

    Thank you.

  2. #2
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: Height = CM instead of Pixels

    Converting Pixels to CM is no easy task. You have to take into account your screen resolution. Look at this (like 3rd Google research after searching for "Converting PX to CM": http://www.experts-exchange.com/Prog..._21588717.html
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width