Tugas 1

RIZKI 1

TUGAS 1.1
Private Sub Command1_Click()
Text2.Text = Val(Text1) * 0.1
Text3.Text = Val(Text1) – Val(Text2)
End Sub

TUGAS 1.2
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
Text2.Text = Val(Text1) * 0.1
Text3.Text = Val(Text1) – Val(Text2)
End If
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text3.SetFocus
End If
End Sub

Private Sub Command2_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
End Sub

Private Sub Command3_Click()
End
End Sub

RIZKY 3

TUGAS 2.1
Private Sub Command1_Click()
Text4.Text = Val(Text1) + Val(Text2) – Val(Text3)
Text5.Text = Val(Text4) * 0.1
Text6.Text = Val(Text4) – Val(Text5)
End Sub

TUGAS 2.2
Private Sub Command1_Click()
Text4.Text = Val(Text1) + Val(Text2) – Val(Text3)
Text5.Text = Val(Text4) * 0.1
Text6.Text = Val(Text4) – Val(Text5)
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text3.SetFocus
End If
End Sub

Private Sub Command2_Click()
Text1.SetFocus
Text1 = ” “
Text2 = ” “
Text3 = ” “
Text4 = ” “
Text5 = ” “
Text6 = ” “
End Sub

Private Sub Command3_Click()
End
End Sub

RIZKY 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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s