Printing Font

mikef74

Newcomer
Joined
Jul 30, 2003
Messages
9
I've got several RichTextBoxes, that I've given the capability of changing the font (through the fontdialog), which works fine, however, when I try to print it, I can't get the font changes to print correctly.....

'Setting the bounds to print
Dim drawtext As New RectangleF(80, ypos, 700, 800)

'Setting the font from the RTB (named t2)
Dim textfont As Font
textfont = New Font(t2.Font.Name, t2.Font.Height, t2.Font.Style)
'Printing string
e.Graphics.DrawString(t2.Text, textfont, Brushes.Black, drawtext)

There has got to be an easier way. Please help.
Thanks
 
We've had the same problem.
We only succeeded after we had found some Code on a Web-Page and altered al little to suit our purposes. If I find the Code I will mail it to you.

As far as I remember we had to build a Class parsing the rtf-String, but I don't really remember.

Will send you a message (either the Code or a dll with this special rtf-Box and its printing-Class), asap

Voca
 
Back
Top