Appearance and Style
Appearance and Style
Aim:
To write a Program using Visual Basic to change the color, font and size of
the text.
Form Design:
Program Coding:
Font Type
Private Sub Option5_Click()
Text1.FontName = "MS Sans Serif"
End Sub
Font Color
Private Sub Option1_Click()
Text1.ForeColor = vbRed
End Sub
Font Size
Font Style
Private Sub Check1_Click()
If Check1.Value = 1 Then
Text1.FontBold = True
Else
Text1.FontBold = False
End If
End Sub
OUTPUT:
Result:
Thus the program “changing the font, color, size of text” has been successfully executed.