Re: Printing Contents of RTB
This is why I use the RichTextBoxPrintControl. Basically the problem is that RTB uses Chr(10) to mark line breaks instead of vbCrLf. You can correct this using string.Replace but remember that you first need to replace all Chr(10) with vbCrLf and then go back through again to erase any double Chr(13) that might create.
Re: Printing Contents of RTB
I have built that project and I get the same result when I test it. Is there something else that I need to do?
I am confused about your comment about string.replace, was this in lieu of using the RichTextBoxPrintCtrl or along with it
Thanks
Re: Printing Contents of RTB
The RTBPrintCtrl is designed to print the RTB content, the whole RTB content, and nothing but the RTB content. It wouldn't make any difference to what you're doing the way you're doing it. Having said that I've just checked the RTB output and actually it doesn't do what I thought it did so what you'll have to do is use the RTB.Lines() array to print each line separately. So ...
vb.net Code:
For Each ln In RichTextBox1.Lines
'drawstring(ln & vbCrLf)
Next