Results 1 to 2 of 2

Thread: Experts only please..

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2000
    Location
    FeedMeTown, Ohio
    Posts
    176

    Experts only please..

    How do I make the form text spacing match the printer text spacing?

    I've developed an application that allows the user to enter multiple spaces between the left and right strings, In this example... let's say that the left string is a product; the right string the price.. using multiple rows. The problem is this:

    The distance between the left and right strings of the printer and form is significantly different. If the distance between the the left string and right string on a particular row on the form is 3 inches, it may come out to be 2.5 inches on the printer form.

    The printer font and form are verifibly the same. Where am I making the mistake?

  2. #2
    Hyperactive Member gravyboy's Avatar
    Join Date
    Jan 2000
    Location
    Where I was before . . . if you don't know then you're new!
    Posts
    334
    a few things spring to mind . . . .


    try using Courier as a font (something to do with it being proportional or something)

    make sure the scalemode for the form and the printer are the same

    identify the ratio between the scalewidth of the printer and the scalewidth of the form

    get the average textwidth
    VB Code:
    1. strWidth = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
    2.  
    3. intAvgTextWidth = (Printer.Textwidth(strWidth)/Len(strWidth))
    Matt G
    VS6 Ent SP5 @ Work
    VS6 Ent SP5 & VB.Net @ Home
    [email protected]



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