Change Font and Colour of Text in a Rich Text Box
Page 1 of 1 • Share •
Change Font and Colour of Text in a Rich Text Box
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:
Double Click Button2 and Type the following Code:
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
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

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

Permissions of this forum:
You cannot reply to topics in this forum





