Results 1 to 3 of 3

Thread: Print format

  1. #1
    Guest

    Post

    How can i do to format my text to be nice and align when i print them.

    Because, i'm printing 9 text box on the same line and each of them are different size, so when it goes out of the printer, it's not in the same column..

    I know in Delphi we use the Format(%20...)etc..

    but in Vb i don't know how to do this...

    thanks everyone...

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,176

    Post

    It depends on how your Printing and what kind of setup you're using, ie.

    You could use a Fixed-Width Font like Courier and Make sure the Length of the Columns if Fixed, eg.
    Code:
    Printer.FontName = "Courier"
    For iLine = 1 To 50
        For iCol = 0 To 4
            Printer.Print Left(TextBoxes(iCol) & Space(15), 15) & " ";
        Next
        Printer.Print
    Next
    Alternatively you could line up each Column before printing using the CurrentX Property of the Printer Object, eg.
    Code:
    For iLine = 1 To 50
        For iCol = 0 To 4
            Printer.CurrentX = iCol * 2000
            Printer.Print Textboxes(iCol);
        Next
        Printer.Print
    Next

    ------------------
    Aaron Young
    Analyst Programmer
    aarony@redwingsoftware.com
    ajyoung@pressenter.com


  3. #3
    Guest

    Post

    i doesn't seem to work,

    i'm still not able to align my textboxes.

    is there another way, because
    i'm not able to use this method

    Thanks.........

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