ABI 2

TUGAS 3.2

Private Sub chkitalic_Click()

‘membuat teks miring

If chkitalic.Value = 1 Then

lbltext.FontItalic = True

Else

lbltext.FontItalic = False

End If

End Sub

Private Sub cmdok_Click()

lbltext.Text = Val(Text1.Text)

End Sub

Private Sub cmdselesai_Click()

End

End Sub

Private Sub optblue_Click()

‘membuat teks berwarna biru

lbltext.ForeColor = vbBlue

End Sub

Private Sub chkbold_Click()

‘membuat teks tebal

If chkbold.Value = 1 Then

lbltext.FontBold = True

Else

lbltext.FontBold = False

End If

End Sub

Private Sub optred_Click()

‘membuat teks berwarna merah

lbltext.ForeColor = vbRed

End Sub

Private Sub lbltext_Change()

lbltext.Text = Text1.Text

End Sub

Advertisements