Font Effect

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Public Class Form1

Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles CheckBox1.CheckedChanged
TextBox1.Font = New Font(TextBox1.Font, FontStyle.Bold)
TextBox2.Font = New Font(TextBox1.Font, FontStyle.Bold)
If CheckBox1.Checked = True Then

Me.BackColor = Color.Azure
Else
Me.BackColor = Color.Bisque
End If
End Sub

Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles CheckBox2.CheckedChanged
TextBox1.Font = New Font(TextBox1.Font, FontStyle.Italic)
TextBox2.Font = New Font(TextBox1.Font, FontStyle.Italic)

If CheckBox1.Checked = True Then


Me.BackColor = Color.BlueViolet
Else
Me.BackColor = Color.BurlyWood
End If
End Sub
Private Sub CheckBox3_CheckedChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles CheckBox3.CheckedChanged
TextBox1.Font = New Font(TextBox1.Font, FontStyle.Underline)
TextBox2.Font = New Font(TextBox1.Font, FontStyle.Underline)

If CheckBox1.Checked = True Then


Me.BackColor = Color.Crimson
Else
Me.BackColor = Color.CadetBlue
End If

End Sub

Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles RadioButton1.CheckedChanged
TextBox1.ForeColor = Color.BlueViolet
TextBox2.ForeColor = Color.BlueViolet

End Sub

Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles RadioButton2.CheckedChanged

TextBox1.ForeColor = Color.HotPink
TextBox2.ForeColor = Color.HotPink
End Sub

Private Sub RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles RadioButton3.CheckedChanged
TextBox1.ForeColor = Color.Magenta
TextBox2.ForeColor = Color.Magenta

End Sub
End Class

You might also like