Print textbox

I have a textbox with test in it that looks like this:

CONNECTION FRONT PAGE DATE Tuesday, September 26, 2006
GENERAL INPUT: GENERAL INPUT CONT:
Actuator Weight (lbf): 411.0000 Design Pressure (psi): 210.0000
Actuator Size (sq in): 100 Operating Pressure (psi): 60.0000
Spring Type: HD Plug Stem Diameter (in): 1.1200
Stroke (in): 2.0000 Bonnet Bore Diameter (in): 1.6260
SEISMIC COEFFICIENTS (g's):
Sx: 3.0000 Sy: 3.0000 Sz: 3.0000
DISTANCE TO CG (in): CONNECTION TYPE:
lx: 0.0000 ly:17.4510 lz: 0.0000 Bolted with Tapped Bonnet (BT)

the text is printed to a text file .txt as well, I would like to print the contents of the textbox as is,

Any help would be greatly appreciated.

thanks

poon23

[1011 byte] By [poon23] at [2007-12-24]
# 1

Hi,

the main idea is to create a printdocument, use its print method and specify in the printpage event the things you want to draw on the page. If you play a bit it will be no problem to get things printed the way you like to.

here is an article about it:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskprintingtext.asp
http://www.vbdotnetheaven.com/Code/Jun2003/2087.asp
http://msdn.microsoft.com/msdnmag/issues/03/02/PrintinginNET/

ralph

ralph. at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2
You can create a bitmap image of the control with its DrawToBitmap method. Check out my code in this thread, it's for a Panel control but will work exactly the same for a TextBox control.
nobugz at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 3

Thanks for both replies, I was able to use both to set up a print screen control and also print the text formatted using the printdocument method.

Thanks

poon23

poon23 at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...