TUGAS 3

ASIAH

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

 

ASIAH

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

 

ASIAH

 

Private Sub Check1_Click()

If Check1.Value = 1 Then

Label1.FontBold = True

Else

lblteks.FontBold = False

End If

End Sub

 

Private Sub Check2_Click()

If Check2.Value = 1 Then

Label1.FontItalic = True

Else

lblteks.FontItalic = False

End If

End Sub

 

Private Sub Check3_Click()

If Check3.Value = 1 Then

Label1.FontUnderline = True

Else

Label1teks.FontUnderline = False

End If

 

End Sub

 

Private Sub Check4_Click()

If Check4.Value = 1 Then

Label1.FontStrikethru = True

Else

Label1teks.FontStrikethru = False

End If

End Sub

 

Private Sub Command1_Click()

End

End Sub

 

Private Sub Option2_Click()

‘membuat teks berwarna hijau

Label1.ForeColor = vbGreen

End Sub

 

Private Sub Option3_Click()

‘membuat teks berwarna biru

Label1.ForeColor = vbBlue

End Sub

 

Private Sub Option4_Click()

‘membuat teks berwarna kuning

Label1.ForeColor = vbYellow

End Sub

 

Private Sub optred_Click()

‘membuat teks berwarna merah

Label1.ForeColor = vbRed

End Sub

 

 

 

ASIAH

 

 

Private Sub Check1_Click()

If Check1.Value = 1 Then

Label2.FontBold = True

Else

Label2.FontBold = False

End If

End Sub

 

Private Sub Check2_Click()

If Check2.Value = 1 Then

Label2.FontItalic = True

Else

Label2.FontItalic = False

End If

End Sub

 

Private Sub Command1_Click()

Label2.Caption = Text1.Text

End Sub

 

Private Sub Command2_Click()

End

End Sub

 

Private Sub Option1_Click()

‘membuat teks berwarna merah

Label2.ForeColor = vbRed

End Sub

 

Private Sub Option2_Click()

‘membuat warna berwarna biru

Label2.ForeColor = vbBlue

End Sub

Iklan

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

Connecting to %s