TUGAS VB 2

program

1. Kode Buah :

Private Sub txtkb_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtnb.SetFocus

End If

End Sub

2. Nama Buah :

Private Sub txtnb_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txthb.SetFocus

End If

End Sub

3. Harga Buah :

Private Sub txthb_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtjb.SetFocus

End If

End Sub

4. Jumlah Beli :

Private Sub txtjb_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txttb.Text = Val(txthb.Text) * (txtjb.Text)

End If

End Sub

5. Total Bayar :

Private Sub txttb_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

End If

End Sub

 

6. Lagi :

Private Sub cmdlagi_Click()

txtkb.SetFocus

txtkb = “”

txtnb = “”

txthb = “”

txtjb = “”

txttb = “”

End Sub

 

7. Batal :

Private Sub cmdbatal_Click()

txtkb.SetFocus

txtkb = “”

txtnb = “”

txthb = “”

txtjb = “”

txttb = “”

End Sub

8. Keluar :

Private Sub cmdkeluar_Click()

End

End Sub

Tinggalkan komentar