I have been working on some code that prints a textbox that lists contact information. When I try to print it, it doesn't print out the tabs that I used to format the text. Here is my code:
Private Sub PrintPage(ByVal sender As Object, ByVal ev As PrintPageEventArgs) _
Handles prndoc.PrintPage
Dim fnt As Font = resultTextBox.Font
ev.Graphics.TextRenderingHint = Drawing.Text.TextRenderingHint.AntiAlias
Dim area As SizeF = New SizeF(ev.MarginBounds.Width, ev.MarginBounds.Height)
Dim lines, chars As Integer
ev.Graphics.MeasureString(resultTextBox.Text.Substring(mStringPos), fnt, _
area, StringFormat.GenericTypographic, chars, _
lines)
Dim rc As New RectangleF(ev.MarginBounds.Left, ev.MarginBounds.Top, _
ev.MarginBounds.Width, ev.MarginBounds.Height)
ev.Graphics.DrawString(resultTextBox.Text.Substring(mStringPos, chars), _
fnt, Brushes.Black, rc, _
StringFormat.GenericTypographic)
mStringPos += chars
ev.HasMorePages = mStringPos < resultTextBox.Text.Length
End Sub
Can someone tell me what I am doing wrong?