Dibawah ini script yang dibutuhkan:
Public Class Form1
Dim kode As String
Dim namapart As String
Dim harga As Double
Dim jumlah As Double
Dim total As Double
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
If MsgBox(“yakin anda Keluar”, vbYesNo + vbQuestion + vbDefaultButton3, “Keluar”) Then
End If
Me.Close()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
txtkode.Clear()
txtharga.ResetText()
txtnama.Clear()
txtjumlah.Clear()
txtbayar.Clear()
txtkode.Focus()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
kode = Val(txtkode.Text)
namapart = Val(txtnama.Text)
harga = Val(txtharga.Text)
jumlah = Val(txtjumlah.Text)
total = harga * jumlah
txtbayar.Text = total
End Sub
End Class
Tidak ada komentar:
Posting Komentar