Outputting bold text using PrintLine

E

Ellie

I have a VB6 program upgraded to vb.net and I need to use the printline
function to write to a text file but I need certain characters in bold.
Would anyone be able to tell me how to do this, if possible? Thanks, Ellie
 
E

Ellie

I probably should have added that this file will then later be read into a
RichTextBox control and that is the only way it will be viewed.
 
T

Tom Shelton

I probably should have added that this file will then later be read into a
RichTextBox control and that is the only way it will be viewed.

Then you need to write out the text in rtf. At the minimum that might
look like:

{\rtf
This is text with some \b bold\b0 .
}

You can find the complete rtf specs online - but that may not be
necessary if what your doing is simple. One way to figure out what you
need is to just use Wordpad to create a simple rtf document with the
feature you want, and then open the generated document in notepad. That
way you can see the rtf markup.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top