Convert visible RichTextBox area into Image object.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • randadotexas
    New Member
    • Aug 2009
    • 2

    Convert visible RichTextBox area into Image object.

    Hello, everybody.

    I'm working on a Vb.net project.
    I have a form with a RichTextBox or a simple TextBox control. It contains hundreds of text lines, so the control has to be scrolled.
    I want to send to a printer only the lines that are currently seen on the control window.
    That is, I want to convert what I see into an Image and then draw that image thru e.Graphics.Draw Image.
    As you can see, it could also be the case of a ListBox, a TreeView or any other scrollable control.
    How can I grab that rectangle area and then convert it into an Image? The rest I already know how to do it.
    Thanks in advance.
    elrendadotexas
  • raids51
    New Member
    • Nov 2007
    • 59

    #2
    I used to know how to do this with a picturebox or a whole form, ill look it up again and post back :)

    Comment

    Working...