Change Font and Colour of Text in a Rich Text Box

Post new topic   Reply to topic

View previous topic View next topic Go down

Change Font and Colour of Text in a Rich Text Box

Post  conorsteel on Sun Aug 31, 2008 5:17 pm

Thing You Need
1 Colour Dialog [ColorDialog1]
1 Font Dialog [FontDialog1]
1 Rich Text Box [RichTextBox1]
2 Buttons [Button1 and Button2]




Change The Button1 Text Property to, "Font"
Change The Button2 Text Property to, "Colour"

Double Click Button1 and Type the following Code:

Code:
FontDialog1.ShowDialog()
RichTextBox1.Font = FontDialog1.Font




Double Click Button2 and Type the following Code:
Code:

ColorDialog1.ShowDialog()
RichTextBox1.ForeColor = ColorDialog1.Color




Thats all you need to do for your simple program. Now Debug and click Button1 and Button2. Change the font and colour to whatever you want.

=) Conor Steel

conorsteel
Admin
Admin

Number of posts: 13
Age: 16
Location: Kilmarnock, Scotland
Registration date: 2008-08-31

View user profile http://homefinanceviewer.webs.com

Back to top Go down

View previous topic View next topic Back to top


Post new topic   Reply to topic
Permissions of this forum:
You cannot reply to topics in this forum