Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Nama : Devi Irma Yunita

NIM : 1905081049

1. DESAIN VIEW

2. CODING

‘' NAMA PROJECT : LATIHAN 9


' TANGGAL : 11-10-2021
' OLEH : DEVI IRMA YUNITA
' KET. : PENAGIHAN PIUTANG
' ------------------------------------------------------------------
Public Class Form1
'Dim TAHUN As Integer
Dim MB, NO, TAKSIRAN, BLN(5) As Integer
B1(5), B2(5), B3(5) As Long
Dim JLHBLN(5), TPJ(5) As Long
Dim X, Y As Integer
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
tb_B1.Focus()
NO = 0 : X = 1
MB = 5
TAKSIRAN = Val(tb_taksiran.Text)
TPJ(X) = TAKSIRAN
lbl_Bke.Text = NO

End Sub

Private Sub tb_B1_KeyPress(sender As Object, e As KeyPressEventArgs) Handles


tb_B1.KeyPress
If Asc(e.KeyChar) = Keys.Enter Then
tb_B2.Focus()

Devi Irma Yunita – 1905081049 – AK5C


e.Handled = True
End If
End Sub
Private Sub tb_B2_KeyPress(sender As Object, e As KeyPressEventArgs) Handles
tb_B2.KeyPress
If Asc(e.KeyChar) = Keys.Enter Then
tb_bawal.Focus()
e.Handled = True
'TAHUN = Val(tb_B1.Text + tb_B2.Text)
lbl_B3.Text = 100 - Val(tb_B1.Text) - Val(tb_B2.Text)
End If
End Sub
Private Sub tb_bawal_KeyPress(sender As Object, e As KeyPressEventArgs) Handles
tb_bawal.KeyPress
If Asc(e.KeyChar) = Keys.Enter Then
tb_tahun.Focus()
e.Handled = True
End If
End Sub
Private Sub tb_tahun_KeyPress(sender As Object, e As KeyPressEventArgs) Handles
tb_tahun.KeyPress
If Asc(e.KeyChar) = Keys.Enter Then
tb_taksiran.Focus()
e.Handled = True
lbl_Bke.Text = NO + 1
End If
X = X + 1
End Sub
Private Sub tb_taksiran_KeyPress(sender As Object, e As KeyPressEventArgs) Handles
tb_taksiran.KeyPress
If Asc(e.KeyChar) = Keys.Enter Then

Y = 1
Do While Y <= MB
lbl_taksiran.Text = lbl_taksiran.Text + Str(TPJ(Y)) + vbCrLf

Loop
Y = Y + 1
End If
End Sub
End Class

3. HASIL

Devi Irma Yunita – 1905081049 – AK5C

You might also like