How do I combine font styles in Visual Basic

I am working on a Visual Basic 2008 application where I am reading the contents of various RTBs and then consolidating them in another.

In this RTB I have to put some text in bold, some in regular and some in (say) bold and underlined or bold and italics. I can't figure out how to combine the styles.

Can someone please help?

(I'm still finding my way round VB after years working in VC)
LVL 1
jindaleeAsked:
Who is Participating?
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Not sure exactly what you're asking for...

For example, if you wanted to make everything in the RichTextBox Bolded, Underlined and Italicized then you would do:

    RichTextBox1.Font = New Font(RichTextBox1.Font, FontStyle.Bold Or FontStyle.Italic Or FontStyle.Underline)
0
 
jindaleeAuthor Commented:
That is exactly what I wanted it to do. Thank you.

(I'm a C++ programmer dumped into a VB project with a short delivery time frame)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.