Results 1 to 2 of 2

Thread: How do i print the text in a textbox??

  1. #1

    Thread Starter
    Hyperactive Member Libero's Avatar
    Join Date
    Jun 2000
    Location
    Swedish viking
    Posts
    460

    Question

    Is there some simple way to print out the contents in a textbox. I only know hard ways.

  2. #2
    Addicted Member LAURENS's Avatar
    Join Date
    Jan 2000
    Location
    Utrecht, the Netherlands
    Posts
    138
    If you don't mind using a RichtTextBox it simply is

    Private Sub Command1_Click()

    RichTextBox1.SelStart = 0
    RichTextBox1.SelLength = Len(RichTextBox1)
    RichTextBox1.SelPrint (Printer.hDC)

    End Sub

    For a textbox you could use something like

    Private Sub Command2_Click()

    Printer.Print Text1
    Printer.EndDoc

    End Sub


    [Edited by LAURENS on 06-15-2000 at 09:22 AM]
    Regards,
    Laurens

    Using VB5 Enterprise edition SP3
    VB6 Enterprise edition SP5

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