Senin, 20 November 2017

Tugas 2.4 Aplikasi Perhitungan Gaji Menggunakan keypress

Tugas 2.4 Aplikasi Perhitungan Gaji

Menggunakan keypress








Berikut Source Codeny:



Private Sub cmdproses_Click()
txtkot = Val(txtgapok) + Val(txttun) - Val(txtpot)
txtpaj = Val(txtkot) * 0.1
txtgadi = Val(txtkot) - Val(txtpaj)
End Sub

Private Sub cmdreset_Click()
txtgapok = ""
txttun = ""
txtpot = ""
txtkot = ""
txtpaj = ""
txtgadi = ""
txtgapok.SetFocus
End Sub
'17100003 renaldi zainal arifin
Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub txtgapok_keypress(keyascii As Integer)
If keyascii = 13 Then
txttun.SetFocus
End If
End Sub

Private Sub txttun_keypress(keyascii As Integer)
If keyascii = 13 Then
txtpot.SetFocus
End If
End Sub

Private Sub txtpot_keypress(keyascii As Integer)
If keyascii = 13 Then
txtkot = Val(txtgapok) + Val(txttun) - Val(txtpot)
txtpaj = Val(txtkot) * 0.1
txtgadi = Val(txtkot) - Val(txtpaj)
End If
End Sub

0 komentar:

Posting Komentar