Solved

How do I format the RichTextBox two combine two fontStyle (example Bold and Italic) in VB.Net 2003?

Posted on 2006-07-14
2
672 Views
Last Modified: 2012-08-14
How do I format the RichTextBox two combine two fontStyle (example Bold and Italic) in VB.Net?

From research I belive in C# you can do the following but I do the following;

richTextBox1.SelectionFont =  new Font( "Tahoma", 10, System.Drawing.FontStyle.Bold |System.Drawing.FontStyle.Italic)

I have tried the following but it did not seem to work.

RichTextBox_Content.SelectionFont = New Font("Tahoma", 8, System.Drawing.FontStyle.Bold And System.Drawing.FontStyle.Italic)

Thanks in Advance

Matthew
0
Comment
Question by:mj_stanton
2 Comments
 
LVL 34

Accepted Solution

by:
Sancler earned 500 total points
ID: 17113751
RichTextBox_Content.SelectionFont = New Font("Tahoma", 8, System.Drawing.FontStyle.Bold And System.Drawing.FontStyle.Italic)

should be

RichTextBox_Content.SelectionFont = New Font("Tahoma", 8, System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic)

That is, the And should be Or

Roger
0
 

Author Comment

by:mj_stanton
ID: 17113885
Excellent, Thanks again Roger worked well
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now