Connecting Tech Pros Worldwide Forums | Help | Site Map

Convert visible area of a RichTextBox into an Image object.

Newbie
 
Join Date: Aug 2009
Posts: 2
#1: Aug 12 '09
Hello, everybody.

I have a form with a RichTextBox or a simple TextBox control. It contains hundreds of text lines, so 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.DrawImage.
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

Reply

Tags
image, rectangle, richtextbox


Similar Visual Basic 4 / 5 / 6 bytes