VB.NET Printing help?

F-MAX

Member
Joined
Jan 11, 2006
Messages
6
Location
USA, Earth
Programming Experience
Beginner
I do not know how to print well with VB.NET. Could someone tell me the code I'd need to print the text in my text box "rtbTBox" and keep it within the page's limits? What I currently have is as follows.

e.Graphics.DrawString(rtbTBox.Text, rtbTBox.Font, Brushes.Black, 150, 125

Other than this I'm pretty sure I have what I need.
 
you'll need to start using e.Graphics.MeasureString() with e.Pagebounds.Right and e.Pagebounds.Bottom to determine when to bump things to the next line as well as detect when it's at the bottom of the page to you can keep going on more pages
 
Back
Top