Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Why is there no way to print formatted rich text in a rich text box in VB.net. There is the PrintDocument class, and you can use the:

 

ev.Graphics.DrawString(line, printFont, Brushes.black, leftMargin, yPos)

 

but that does not include the background color. Its bad enough that Visual Studio .net does not even have a rich text box that can highlight text, but now there is no way to print it. Does anyone know how to print formatted RTF the way it appears on the screen, or can you only print one color one size text.

 

Am i going to have to read the properties of each character to determine the text color, and the font and size information, then use the drawstring, then draw a rectangle that is filled in around the line of text???? How do you do that?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...