Public Class Form1
'Buka Menggunakan CheckBox.vbproj
Private Sub chkTebal_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkTebal.CheckedChanged
If chkTebal.Checked = True Then
txtTeks.Font = New Font(txtTeks.Font, txtTeks.Font.Style Or FontStyle.Bold)
Else
txtTeks.Font = New Font(txtTeks.Font, txtTeks.Font.Style And Not FontStyle.Bold)
End If
End Sub
Private Sub chkMiring_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkMiring.CheckedChanged
If chkMiring.Checked = True Then
txtTeks.Font = New Font(txtTeks.Font, txtTeks.Font.Style Or FontStyle.Italic)
Else
txtTeks.Font = New Font(txtTeks.Font, txtTeks.Font.Style And Not FontStyle.Italic)
End If
End Sub
Private Sub chkGaris_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkGaris.CheckedChanged
If chkGaris.Checked = True Then
txtTeks.Font = New Font(txtTeks.Font, txtTeks.Font.Style Or FontStyle.Underline)
Else
txtTeks.Font = New Font(txtTeks.Font, txtTeks.Font.Style And Not FontStyle.Underline)
End If
End Sub
End Class
Tidak ada komentar:
Posting Komentar