tugas bahasa pemrograman

TUGAS 1 A
tugas 1 a
Private Sub Text1_KEYPRESS(KEYASCII As Integer)
If KEYASCII = 13 Then
Text2.SetFocus
End If
End Sub

Private Sub COMMANDHITUNG_CLICK()
TextHASIL = Val(Text1) * Val(Text2)
End Sub

Private Sub COMMANDBERSIH_CLICK()
Text1.SetFocus
Text1 = “”
Text2 = “”
TextHASIL = “”
End Sub
Private Sub COMMANDKELUAR_CLICK()
End
End Sub

TUGAS 1 B
tugas 1 b
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
TextHASIL = Val(Text1) * Val(Text2)
End If
End Sub

Private Sub COMMANDHITUNG_CLICK()
TextHASIL = Val(Text1) * Val(Text2)
End Sub

Private Sub COMMANDBERSIH_CLICK()
Text1.SetFocus
Text1 = “”
Text2 = “”
TextHASIL = “”
End Sub

Private Sub COMMANDKELUAR_CLICK()
End
End Sub

TUGAS 2 A

tugas 2 a

Private Sub Text9_Change()

End Sub

Private Sub PENG1_KEYPRESS(keyascii As Integer)
If keyascii = 13 Then
PENG2.SetFocus
End If
End Sub

Private Sub PENG2_keypress(keyascii As Integer)
If keyascii = 13 Then
PEM1.SetFocus
End If
End Sub
Private Sub pen2_keypress(keyascii As Integer)
If keyascii = 13 Then
PER1.SetFocus
End If
End Sub
Private Sub per2_keypress(keyascii As Integer)
If keyascii = 13 Then
PENG1.SetFocus
End If

End Sub

Private Sub Pen1_keypress(keyascii As Integer)
If keyascii = 13 Then
PEN2.SetFocus
End If
End Sub
Private Sub per1_keypress(keyascii As Integer)
If keyascii = 13 Then
PER2.SetFocus
End If
End Sub
Private Sub Pem1_keypress(keyascii As Integer)
If keyascii = 13 Then
PEM2.SetFocus
End If
End Sub

Private Sub commandPROSES_Click()
PEN3.Text = Val(PEN1.Text) + Val(PEN2.Text)
PER3.Text = Val(PER1.Text) * Val(PER2.Text)
PENG3.Text = Val(PENG1.Text) – Val(PENG2.Text)
PEM3.Text = Val(PEM1.Text) / Val(PEM2.Text)

End Sub

Private Sub commandlagi_Click()
PEN1.Text = “”
PEN2.Text = “”
PEN3.Text = “”
PER1.Text = “”
PER2.Text = “”
PER3.Text = “”
PEM1.Text = “”
PEM2.Text = “”
PEM3.Text = “”
PENG1.Text = “”
PENG2.Text = “”
PENG3.Text = “”

End Sub

Private Sub commandbatal_Click()
PEN1.SetFocus
PEN1.Text = “”
PEN2.Text = “”
PEN3.Text = “”
PER1.Text = “”
PER2.Text = “”
PER3.Text = “”
PEM1.Text = “”
PEM2.Text = “”
PEM3.Text = “”
PENG1.Text = “”
PENG2.Text = “”
PENG3.Text = “”

End Sub

Private Sub commandkeluar_Click()
End
End Sub
TUGAS 2B

tugas 2 b

Private Sub Text9_Change()

End Sub

Private Sub PENG1_KEYPRESS(keyascii As Integer)
If keyascii = 13 Then
peng2.SetFocus
End If
End Sub

Private Sub peng2_keypress(keyascii As Integer)
If keyascii = 13 Then
peng3.Text = Val(peng1.Text) – Val(peng2.Text)
pem1.SetFocus
End If
End Sub

Private Sub Pen1_keypress(keyascii As Integer)
If keyascii = 13 Then
pen2.SetFocus
End If
End Sub

Private Sub pen2_keypress(keyascii As Integer)
If keyascii = 13 Then
pen3.Text = Val(pen1.Text) + Val(pen2.Text)
per1.SetFocus
End If
End Sub

Private Sub per1_keypress(keyascii As Integer)
If keyascii = 13 Then
per2.SetFocus
End If
End Sub

Private Sub per2_keypress(keyascii As Integer)
If keyascii = 13 Then
per3.Text = Val(per1.Text) * Val(per2.Text)
peng1.SetFocus
End If
End Sub

Private Sub Pem1_keypress(keyascii As Integer)
If keyascii = 13 Then
pem2.SetFocus
End If
End Sub

Private Sub pem2_keypress(keyascii As Integer)
If keyascii = 13 Then
pem3.Text = Val(pem1.Text) / Val(pem2.Text)
pem2.SetFocus
End If
End Sub
Private Sub commandPROSES_Click()
pen3.Text = Val(pen1.Text) + Val(pen2.Text)
per3.Text = Val(per1.Text) * Val(per2.Text)
peng3.Text = Val(peng1.Text) – Val(peng2.Text)
pem3.Text = Val(pem1.Text) / Val(pem2.Text)

End Sub

Private Sub commandlagi_Click()
pen1.Text = “”
pen2.Text = “”
pen3.Text = “”
per1.Text = “”
per2.Text = “”
per3.Text = “”
pem1.Text = “”
pem2.Text = “”
pem3.Text = “”
peng1.Text = “”
peng2.Text = “”
peng3.Text = “”

End Sub

Private Sub commandbatal_Click()
pen1.SetFocus
pen1.Text = “”
pen2.Text = “”
pen3.Text = “”
per1.Text = “”
per2.Text = “”
per3.Text = “”
pem1.Text = “”
pem2.Text = “”
pem3.Text = “”
peng1.Text = “”
peng2.Text = “”
peng3.Text = “”

End Sub

Private Sub commandkeluar_Click()
End
End Sub
TUGAS 3A

tugas 3 a
Private Sub TextHARGA_KEYPRESS(KEYASCII As Integer)
If KEYASCII = 13 Then
End If
End Sub

Private Sub CommandHITUNG_CLICK()
TextDIS = Val(TextHARGA) * 0.1
TextHA = Val(TextHARGA) – Val(TextDIS)
End Sub

Private Sub CommandULANGI_CLICK()
TextHARGA.SetFocus
TextHARGA = “”
TextDIS = “”
TextHA = “”
End Sub
Private Sub COMMANDKELUAR_CLICK()
End
End Sub
TUGAS 3 B
tugas 3 b
Private Sub Text3_Change()

End Sub

Private Sub TextHARGA_KEYPRESS(KEYASCII As Integer)
If KEYASCII = 13 Then
TextDIS = Val(TextHARGA) * 0.1
TextHA = Val(TextHARGA) – Val(TextDIS)
End If
End Sub

Private Sub CommandHITUNG_CLICK()
TextDIS = Val(TextHARGA) * 0.1
TextHA = Val(TextHARGA) – Val(TextDIS)
End Sub

Private Sub CommandULANGI_CLICK()
TextHARGA.SetFocus
TextHARGA = “”
TextDIS = “”
TextHA = “”
End Sub
Private Sub COMMANDKELUAR_CLICK()
End
End Sub

TUGAS 4 A
tugas 4 a
Private Sub CommandKELUAR_Click()
End
End Sub

Private Sub CommandULANG_Click()
GP.SetFocus
GP = “”
TUNJANGAN = “”
POTONGAN = “”
PAJAK = “”
GK = “”
GD = “”
End Sub

Private Sub GP_keypress(keyascii As Integer)
If keyascii = 13 Then
TUNJANGAN.SetFocus
End If
End Sub

Private Sub tunjangan_keypress(keyascii As Integer)
If keyascii = 13 Then
POTONGAN.SetFocus
End If
End Sub
Private Sub potongan_keypress(keyascii As Integer)
If keyascii = 13 Then
GK.SetFocus
End If
End Sub
Private Sub commandproses_click()
GK = Val(GP) + Val(TUNJANGAN) – Val(POTONGAN)
PAJAK = Val(GK) * 0.1
GD = Val(GK) – Val(PAJAK)
End Sub
TUGAS 4 B

tugas 4 b

Private Sub CommandKELUAR_Click()
End
End Sub

Private Sub CommandULANG_Click()
GP.SetFocus
GP = “”
TUNJANGAN = “”
POTONGAN = “”
PAJAK = “”
GK = “”
GD = “”
End Sub

Private Sub GP_keypress(keyascii As Integer)
If keyascii = 13 Then
TUNJANGAN.SetFocus
End If
End Sub

Private Sub tunjangan_keypress(keyascii As Integer)
If keyascii = 13 Then
POTONGAN.SetFocus
End If
End Sub
Private Sub potongan_keypress(keyascii As Integer)
If keyascii = 13 Then
GK = Val(GP) + Val(TUNJANGAN) – Val(POTONGAN)
PAJAK = Val(GK) * 0.1
GD = Val(GK) – Val(PAJAK)
End If
End Sub
Private Sub commandproses_click()
GK = Val(GP) + Val(TUNJANGAN) – Val(POTONGAN)
PAJAK = Val(GK) * 0.1
GD = Val(GK) – Val(PAJAK)
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