PROGRAM PENJUALAN BARANG
Pertama, buka Microsoft Visual Studio 2010.
Kemudian buat project baru dengan mengklik icon new project atau buka menu file kemudian klik new project.
Maka akan keluar seperti gambar berikut :
Pada Recent Template pilih Visual Basic – Windows – Windows Form Application.
Ketikkan nama pada kotak Name
Lalu pilih tempat penyimpanannya
Klik OK
Buatlah desain form seperti gambar berikut :
Atur properties pada masing – masing object seperti pada tabel berikut :
Object | Properties | Value |
Form | Text | Program Penjualan Barang |
Textbox1 | Name | Txtnamabarang |
Textbox2 | Name | Txtkodebarang |
Textbox3 | Name | Txthargabarang |
Textbox4 | Name | Txtjumlahbarang |
Textbox5 | Name | Txtdiskon |
Label6 | Autosize,backcolor, borderstyle | False, ControlLightLight, Fixed3D |
Label7 | Autosize,backcolor, borderstyle | False, ControlLightLight, Fixed3D |
Label8 | Autosize,backcolor, borderstyle | False, ControlLightLight, Fixed3D |
Button1 | NameText | Total Harga&totalharga |
Button2 | NameText | Diskon&diskon |
Button3 | NameText | Total Bayar&totalbayar |
Button4 | NameText | Bersih&buton5 |
Double klik form kemudian ketik source code berikut :
Double klik pada tombol Total Harga kemudian ketik source code berikut :
Double klik form kemudian ketik source code berikut :
Double klik pada tombol Diskon kemudian ketik source code berikut :
Double klik pada tombol Total Bayar kemudian ketik source code berikut :
Kemudian jalankan program :