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
682 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying 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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

627 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