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:
TextBox1.Font = FontDialog1.Font

To change Text color on runtime:
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


Leave a Reply