Anda di halaman 1dari 3

Private Sub optbold_Click()

If optbold = 1 And optitalic = 0 And optunderline = 0 Then


txthasil.FontItalic = False
txthasil.FontBold = True
txthasil.FontUnderline = False
ElseIf optbold = 0 And optitalic = 1 And optunderline = 0 Then
txthasil.FontItalic = True
txthasil.FontBold = False
txthasil.FontUnderline = False
ElseIf optbold = 0 And optitalic = 0 And optunderline = 1 Then
txthasil.FontItalic = False
txthasil.FontBold = False
txthasil.FontUnderline = True
ElseIf optbold = 1 And optitalic = 1 And optunderline = 0 Then
txthasil.FontItalic = True
txthasil.FontBold = True
txthasil.FontUnderline = False
ElseIf optbold = 1 And optitalic = 0 And optunderline = 1 Then
txthasil.FontItalic = False
txthasil.FontBold = True
txthasil.FontUnderline = True
ElseIf optbold = 0 And optitalic = 1 And optunderline = 1 Then
txthasil.FontItalic = True
txthasil.FontBold = False
txthasil.FontUnderline = True
ElseIf optbold = 1 And optitalic = 1 And optunderline = 1 Then
txthasil.FontItalic = True
txthasil.FontBold = True
txthasil.FontUnderline = True
Else
txthasil.FontItalic = False
txthasil.FontBold = False
txthasil.FontUnderline = False
End If
End Sub
Private Sub optitalic_Click()
If optbold = 1 And optitalic = 0 And optunderline = 0 Then
txthasil.FontItalic = False
txthasil.FontBold = True
txthasil.FontUnderline = False
ElseIf optbold = 0 And optitalic = 1 And optunderline = 0 Then
txthasil.FontItalic = True
txthasil.FontBold = False
txthasil.FontUnderline = False
ElseIf optbold = 0 And optitalic = 0 And optunderline = 1 Then
txthasil.FontItalic = False
txthasil.FontBold = False
txthasil.FontUnderline = True
ElseIf optbold = 1 And optitalic = 1 And optunderline = 0 Then
txthasil.FontItalic = True
txthasil.FontBold = True
txthasil.FontUnderline = False
ElseIf optbold = 1 And optitalic = 0 And optunderline = 1 Then
txthasil.FontItalic = False
txthasil.FontBold = True
txthasil.FontUnderline = True
ElseIf optbold = 0 And optitalic = 1 And optunderline = 1 Then
txthasil.FontItalic = True
txthasil.FontBold = False
txthasil.FontUnderline = True
ElseIf optbold = 1 And optitalic = 1 And optunderline = 1 Then
txthasil.FontItalic = True
txthasil.FontBold = True
txthasil.FontUnderline = True
Else
txthasil.FontItalic = False
txthasil.FontBold = False
txthasil.FontUnderline = False
End If
End Sub
Private Sub optunderline_Click()
If optbold = 1 And optitalic = 0 And optunderline = 0 Then
txthasil.FontItalic = False
txthasil.FontBold = True
txthasil.FontUnderline = False
ElseIf optbold = 0 And optitalic = 1 And optunderline = 0 Then
txthasil.FontItalic = True
txthasil.FontBold = False
txthasil.FontUnderline = False
ElseIf optbold = 0 And optitalic = 0 And optunderline = 1 Then
txthasil.FontItalic = False
txthasil.FontBold = False
txthasil.FontUnderline = True
ElseIf optbold = 1 And optitalic = 1 And optunderline = 0 Then
txthasil.FontItalic = True
txthasil.FontBold = True
txthasil.FontUnderline = False
ElseIf optbold = 1 And optitalic = 0 And optunderline = 1 Then
txthasil.FontItalic = False
txthasil.FontBold = True
txthasil.FontUnderline = True
ElseIf optbold = 0 And optitalic = 1 And optunderline = 1 Then
txthasil.FontItalic = True
txthasil.FontBold = False
txthasil.FontUnderline = True
ElseIf optbold = 1 And optitalic = 1 And optunderline = 1 Then
txthasil.FontItalic = True
txthasil.FontBold = True
txthasil.FontUnderline = True
Else
txthasil.FontItalic = False
txthasil.FontBold = False
txthasil.FontUnderline = False
End If
End Sub

Anda mungkin juga menyukai