Desainlah Form Seperti berikut :
-ubah properti name button1 menjadi "btnulangi"
-ubah properti name button2 menjadi "btnselesai"
Kemudian Ketikan Source Kode berikut :
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ComboBox1.Focus()
ComboBox1.Items.Add("B002")
ComboBox1.Items.Add("C003")
ComboBox1.Items.Add("D004")
TextBox1.Enabled = False
TextBox2.Enabled = False
TextBox4.Enabled = False
TextBox5.Enabled = False
TextBox6.Enabled = False
TextBox7.Enabled = False
TextBox9.Enabled = False
End Sub
Private Sub ComboBox1_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedValueChanged
If ComboBox1.Text = "A001" Then
TextBox1.Text = "Mesin Cuci"
TextBox2.Text = 1000000
ElseIf ComboBox1.Text = "B002" Then
TextBox1.Text = "Kulkas"
TextBox2.Text = 1500000
ElseIf ComboBox1.Text = "C003" Then
TextBox1.Text = "Televisi"
TextBox2.Text = 1250000
ElseIf ComboBox1.Text = "D004" Then
TextBox1.Text = "Komputer"
TextBox2.Text = 3500000
End If
TextBox3.Focus()
End Sub
Private Sub TextBox3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox3.TextChanged
TextBox4.Text = Val(TextBox2.Text) * Val(TextBox3.Text)
If Val(TextBox3.Text) > 5 Then
TextBox5.Text = 0.3 * Val(TextBox4.Text)
Else
TextBox5.Text = 0
End If
TextBox6.Text = 0.1 * Val(TextBox4.Text)
TextBox7.Text = Val(TextBox4.Text) - Val(TextBox5.Text) + Val(TextBox6.Text)
TextBox8.Focus()
End Sub
Private Sub TextBox8_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox8.TextChanged
TextBox9.Text = Val(TextBox8.Text) - Val(TextBox7.Text)
End Sub
Private Sub btnselesai_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnselesai.Click
End
End Sub
Private Sub bersih()
ComboBox1.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
End Sub
Private Sub btnulangi_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnulangi.Click
bersih()
ComboBox1.Focus()
End Sub
End Class
kemudian jalankan programnya dan lihat hasilnya....
untuk aplikasi ini cukup sampai disini...Insya Allah postingan berikunya sudah menggunakan database....
Semoga Bermanfaat.....
Aplikasi Penjualan Barang Tanpa Menggunakan Database dengan Visual Basic.Net 2008
Diposting oleh
aat_dCc
/ 02.08 /
1 komentar:
Mantap...
Suah bisa jadi penjual ine...
hehe...:)
:)) :)] ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* : 8-} ~x( :-t b-( :-L x( =))
Posting Komentar