Results 1 to 4 of 4

Thread: priting contents of a textbox to a printer problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2008
    Posts
    14

    priting contents of a textbox to a printer problem

    how can I print the contents of a text/richtextbox to a printer hardware? tnx!

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: priting contents of a textbox to a printer problem

    In a nutshell it's as simple as:
    Code:
    Printer.Print Text1.Text
    Printer.EndDoc
    However, line wrapping, new pages, etc will need to be calculated.
    I believe we have samples of advanced printing posted so try to search.

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2008
    Posts
    14

    Re: priting contents of a textbox to a printer problem

    Thank you very much for the quick help.. its very appreciated..

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: priting contents of a textbox to a printer problem

    Or, for the richtextbox you can use a simple one liner
    Code:
    Call RichTextBox1.SelPrint(Printer.hdc)
    For a standard textbox, you would need to use RhinoBull's code.

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