Shane Partridge
Visual Basic 2013
The Code
Public Class Form85
'## Font Event Data Configuration ##
'## Bold ##
'## Italic ##
'## Underline ##
'## Strikeout ##
'## Regular - Reverted to (Else) If Then Else Statement using (and not) ##
'## SubRoutine Event Data Configuration ##
'## Private Sub Rountine Checkbox1_CheckedChanged ##
'## Alternates Label1.Text Font to Bold as Checked ##
'## Alternates Label1.Text Font to Un-Bold as Un-Checked ##
'## Value of Label1.Text added in Form VB Design Mode - (Label1.Font) ##
Private Sub Checkbox1_CheckedChangedBoldFont(sender As Object, e As EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked Then
Label1.Font = New Font(Label1.Font, Label1.Font.Style Or FontStyle.Bold)
Else
Label1.Font = New Font(Label1.Font, Label1.Font.Style And Not FontStyle.Bold)
End If
End Sub
'## Private Sub Rountine Checkbox2_CheckedChanged ##
'## Alternates Label1.Text Font to Italic as Checked ##
'## Alternates Label1.Text Font to Un-Italic as Un-Checked ##
Private Sub Checkbox2_CheckedChangedItalicFont(sender As Object, e As EventArgs) Handles CheckBox2.CheckedChanged
If CheckBox2.Checked Then
Label1.Font = New Font(Label1.Font, Label1.Font.Style Or FontStyle.Italic)
Else
Label1.Font = New Font(Label1.Font, Label1.Font.Style And Not FontStyle.Italic)
End If
End Sub
'## Private Sub Rountine Checkbox3_CheckedChanged ##
'## Alternates Label1.Text Font to Underline as Checked ##
'## Alternates Label1.Text Font to Un-Underline as Un-Checked ##
Private Sub Checkbox3_CheckedChangedUnderlineFont(sender As Object, e As EventArgs) Handles CheckBox3.CheckedChanged
If CheckBox3.Checked Then
Label1.Font = New Font(Label1.Font, Label1.Font.Style Or FontStyle.Underline)
Else
Label1.Font = New Font(Label1.Font, Label1.Font.Style And Not FontStyle.Underline)
End If
End Sub
'## Private Sub Rountine Checkbox4_CheckedChanged ##
'## Alternates Label1.Text Font to Strikeout as Checked ##
'## Alternates Label1.Text Font to Un-Underline as Un-Strikeout ##
Private Sub Checkbox4_CheckedChangedUnderlineFont(sender As Object, e As EventArgs) Handles CheckBox4.CheckedChanged
If CheckBox4.Checked Then
Label1.Font = New Font(Label1.Font, Label1.Font.Style Or FontStyle.Strikeout)
Else
Label1.Font = New Font(Label1.Font, Label1.Font.Style And Not FontStyle.Strikeout)
End If
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
'## Clear CheckBox Values ##
CheckBox1.Checked = False '## Bold ##
CheckBox2.Checked = False '## Italic ##
CheckBox3.Checked = False '## Underline ##
CheckBox4.Checked = False '## Strikeout ##
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
'## Revert Back to Index Menu ##
Form81.Show()
Me.Hide()
End Sub
End Class