Results 1 to 3 of 3

Thread: Print Text

  1. #1

    Thread Starter
    Hyperactive Member WP's Avatar
    Join Date
    Aug 2000
    Location
    Belgium
    Posts
    278

    Angry

    How can I set the X and Y coördinates when i want to print the text of a richtextbox? When I use the CurrentX and Y of the printer, he don't listen to it. (I use a paper with already some text on it, so i have to change the X and Y)
    Like this:

    Code:
    Printer.CurrentX = 100 'He didn't listen to this
    Printer.CurrentY = 3000 'He didn't listen to this
    RichTextBox1.SelPrint (Printer.hDC) 'He prints the text on top of the page (X=0, Y=0)
    How to set X and Y ?

    WP

    Visual Basic 6.0 EE SP5 / .Net
    Windows XP

  2. #2
    Guest
    See if this helps:

    Note If you use the Printer object as the destination of the text from the RichTextBox control, you must first initialize the device context of the Printer object by printing something like a zero-length string.
    Code:
    Printer.CurrentX = 100
    Printer.CurrentY = 3000 - Printer.TextHeight(" ")
    Printer.print " "
    ' Print method advanced CurrentY to 3000
    RichTextBox1.SelPrint (Printer.hDC)

  3. #3

    Thread Starter
    Hyperactive Member WP's Avatar
    Join Date
    Aug 2000
    Location
    Belgium
    Posts
    278

    Exclamation Sorry

    I didn't work .... or I typed something wrong, but I think it the first one

    WP

    Visual Basic 6.0 EE SP5 / .Net
    Windows XP

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