Site icon Student Project Guidance & Development

Changing Font property, Color and Alignment on Runtime

Font propertys

Font is one of the factors that are responsible to make your websites look good on the system. All might be aware of the font properties that we use in day to day activities while working in the computer. Using different font properties the websites or the documents that you prepare can be made to look more attractive. The changing font property, color and alignment on run time in VB.Net will act as a guide in providing the details of the font properties that are present in VB.Net. This will be one of the applications that can help in understanding the users about the font dialog properties in VB.Net.

The different font properties that are available in VB.Net are as follows:

This tutorial explains Changing Font property, Color and Alignment on Runtime in VB.NET. This simple program which explains to change style, Fore color, and alignment on run time. FontDialog used to change font properties, ColorDialog property used 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

Video tutorial:

Download Project code:

Exit mobile version