LIA TUGAS 1

program1

Private Sub chkBold_Click()

‘membuat teks tebal

If chkBold.Value = 1 Then

lblTeks.FontBold = True

Else

lblTeks.FontBold = False

End If

End Sub

Private Sub chkItalic_Click()

‘membuat teks miring

If chkItalic.Value = 1 Then

lblTeks.FontItalic = True

Else

lblTeks.FontItalic = False

End If

End Sub

Private Sub chkStrike_Click()

‘membuat teks bergaris tengah

If chkStrike.Value = 1 Then

lblTeks.FontStrikethru = True

Else

lblTeks.FontStrikethru = False

End If

End Sub

Private Sub chkUnder_Click()

‘membuat teks bergaris bawah

If chkUnder.Value = 1 Then

lblTeks.FontUnderline = True

Else

lblTeks.FontUnderline = False

End If

End Sub

Private Sub cmdExit_Click()

End

End Sub

Private Sub optBlue_Click()

‘membuat teks berwarna biru

lblTeks.ForeColor = vbBlue

End Sub

Private Sub optGreen_Click()

‘membuat teks berwarna hijau

lblTeks.ForeColor = vbGreen

End Sub

Private Sub optRed_Click()

‘membuat teks berwarna merah

lblTeks.ForeColor = vbRed

End Sub

Private Sub optYellow_Click()

‘membuat teks berwarna kuning

lblTeks.ForeColor = vbYellow

End Sub

Iklan