"Jonathan Smith" <Jo***********@discussions.microsoft.com> schrieb:
In VB i had some very very simple code that would print out the contents
of a
textbox for me.
It was simply
Sub PrintTB()
Printer.Print(Text1.Text)
End sub
Very simple, and 110% effective.
How the hell do i do this in VB .Net???
That's not as easy. You will have to use the 'PrintDocument' object and
draw the string onto the printer using 'e.Graphics.ToString' in the
'PrintDocument''s 'PrintPage' event handler. 'PrintDocument' won't to
paging automatically, so you'll have to measure the text you are printing
and start a new page using 'e.HasMorePages' manually, which will cause
'PrintPage' to be called one more time for the next page.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>