Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How do I combine font styles in Visual Basic

Posted on 2009-02-22
2
Medium Priority
?
254 Views
Last Modified: 2013-11-27
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)
0
Comment
Question by:jindalee
2 Comments
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 2000 total points
ID: 23712181
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
 
LVL 1

Author Closing Comment

by:jindalee
ID: 31549929
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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question