Results 1 to 6 of 6

Thread: [RESOLVED] [2005] VB.Net Printing coordinates

  1. #1

    Thread Starter
    Addicted Member Genom's Avatar
    Join Date
    May 2006
    Posts
    186

    Resolved [RESOLVED] [2005] VB.Net Printing coordinates

    Hi all;
    I will use system.drawing for puting some strings to a ready form. But I need to match strings to several places on the form. To do this I have to match coordinates. The problem is that I dont know which unit the coordinates are?
    Is it twink, inch, cm, mm?
    Dim Me As Coder

  2. #2

    Thread Starter
    Addicted Member Genom's Avatar
    Join Date
    May 2006
    Posts
    186

    Re: [2005] VB.Net Printing coordinates

    nobody knows? Ok more detailed: for example we have
    vb Code:
    1. e.Graphics.DrawString("sdf", System.Drawing.SystemFonts.CaptionFont, Brushes.BlueViolet, 0, 1160)
    ...,0,... is the x coordiante
    ...,1160,.... is the y coordinate.
    But I want to know what 1160 means on real paper. How much mm is it? Does anybody know?
    Dim Me As Coder

  3. #3
    PowerPoster
    Join Date
    Jul 2002
    Location
    Dublin, Ireland
    Posts
    2,148

    Re: [2005] VB.Net Printing coordinates

    Measurement is in tenths of a millimeter.

    Therefore 1160 = 116 mm or 11.6 cm

  4. #4

    Thread Starter
    Addicted Member Genom's Avatar
    Join Date
    May 2006
    Posts
    186

    Re: [2005] VB.Net Printing coordinates

    thanks Merrion
    Dim Me As Coder

  5. #5
    Hyperactive Member
    Join Date
    Aug 2005
    Location
    Lancashire UK
    Posts
    375

    Re: [2005] VB.Net Printing coordinates

    You can set the units to whatever you want by setting the graphics PageUnit property.....

    vb Code:
    1. Dim g as Graphics=e.graphics
    2. g.PageUnit=GraphicsUnit.millimeter

    Would set the units to millimeters so any drawings sizes would be in millimeters.
    If my post helps , please feel free to rate it

  6. #6

    Thread Starter
    Addicted Member Genom's Avatar
    Join Date
    May 2006
    Posts
    186

    Re: [2005] VB.Net Printing coordinates

    Thanks all. I have found out that in my one it is 40 =1 cm. I will use this scala. Thanks for your help...
    Dim Me As Coder

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