9. WAP using check boxes for following font effects.
Bold
Italic
Underline
Increase font size
Decrease font size
Font color
Private Sub chkBold_Click()
' turn on bold attribute if checkbox is checked
If chkBold.Value = 1 Then
txtsample.Font.Bold = True
Else
txtsample.Font.Bold = False
End If
End Sub
Private Sub chkItalic_Click()
' turn on Italic attribute if checkbox is checked
If chkItalic.Value = 1 Then
txtsample.Font.Italic = True
Else
txtsample.Font.Italic = False
End If
End Sub
Private Sub chkUnderline_Click()
' turn on Underline attribute if checkbox is checked
If chkUnderline.Value = 1 Then
txtsample.Font.Underline = True
Else
txtsample.Font.Underline = True
End If
End Sub
Private Sub cmdquit_Click()
‘ unload current form and as the result program is terminated Unload Me
End Sub
Bold
Italic
Underline
Increase font size
Decrease font size
Font color
Private Sub chkBold_Click()
' turn on bold attribute if checkbox is checked
If chkBold.Value = 1 Then
txtsample.Font.Bold = True
Else
txtsample.Font.Bold = False
End If
End Sub
Private Sub chkItalic_Click()
' turn on Italic attribute if checkbox is checked
If chkItalic.Value = 1 Then
txtsample.Font.Italic = True
Else
txtsample.Font.Italic = False
End If
End Sub
Private Sub chkUnderline_Click()
' turn on Underline attribute if checkbox is checked
If chkUnderline.Value = 1 Then
txtsample.Font.Underline = True
Else
txtsample.Font.Underline = True
End If
End Sub
Private Sub cmdquit_Click()
‘ unload current form and as the result program is terminated Unload Me
End Sub