Changing Font property, Color and Alignment on Runtime in VB.NET

This is a simple program which explains to change style, Fore color, and alignment at Runtime using VB.NET. FontDialog tool to change font properties, ColorDialog property tool to change color of the text in multiline textbox.

To change Textbox font on runtime:
FontDialog1.ShowDialog()
TextBox1.Font = FontDialog1.Font

To change Text color on runtime:
ColorDialog1.ShowDialog()
TextBox1.ForeColor = ColorDialog1.Color

To change Text alignment on runtime:
Align right side : TextBox1.TextAlign = HorizontalAlignment.Right
Align Left side : TextBox1.TextAlign = HorizontalAlignment.Left
Align Centerside : TextBox1.TextAlign = HorizontalAlignment.Center

Download project files:

download source code

Anu

Leave a Reply