Membuat Program Retail DVD Games
Setelah UTS beberapa hari ini saya baru sempat memposting suatu yang baru lagi masih berkenaan dengan program sederhana yang dapat kita buat di ms. visual studios 2010, kali ini saya akan memberikan sebuah contoh program yang mana ada fungsi IF dan fungsi aritmatika seperti perkalian penambahan dan pengurangan,,,
Untuk kali ini saya sertakan program yang sudah jadi dan silahkan di remake ataupun sebagai referensi di projek anda,,
Read More
Link to download >> DOWNLOAD <<
Berikut Screen Shoot Program:
Berikut ini adalah koding nya:
Public Class Form1
Dim txttharga As Object
'Menampilkan messages box saat kode tidak di isi / kosong
Private Sub txtkode_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtkode.KeyPress
Dim x As String
If e.KeyChar = Chr(13) Then
If Me.txtkode.Text = "" Then
x = MsgBox("Sorry, Silahkankan isi kode retail terlebih dulu", MsgBoxStyle.Critical, "Peringatan")
Else
Me.txtkode.Focus()
End If
End If
End Sub
'Untuk Menghapus riwayat dari transaksi yang telah di lakukan
Sub bersih()
Me.txtkode.Clear()
Me.txtnama.Clear()
Me.txtHarga.Clear()
Me.txtlama.Clear()
Me.txttotal.Clear()
Me.txtjumlah.Clear()
Me.txtkembali.Clear()
Me.cblama.Text = "==Waktu Peminjaman=="
Me.cboffline.Text = "=Nama Game="
Me.rbsport.Text = "Sports"
Me.rbrpg.Text = "RPG"
Me.rbfps.Text = "FPS"
Me.rbsim.Text = "SIMULATION"
End Sub
'Menampilkan DVD game yang bisa dipilih saat combo box di klik setelah pilihan pada radio button di klik
Sub sports()
Me.cboffline.Items.Clear()
Me.cboffline.Items.Add("PES 2013")
Me.cboffline.Items.Add("PES 2014")
Me.cboffline.Items.Add("NASCAR 2013")
Me.cboffline.Items.Add("NASCAR 2014")
Me.cboffline.Items.Add("FIFA 2013")
Me.cboffline.Items.Add("FIFA 2014")
End Sub
Sub rpg()
Me.cboffline.Items.Clear()
Me.cboffline.Items.Add("GTA IV")
Me.cboffline.Items.Add("GTA SAN")
Me.cboffline.Items.Add("SLEEPING DOG")
Me.cboffline.Items.Add("NARUTO")
Me.cboffline.Items.Add("WATCH DOG")
Me.cboffline.Items.Add("SKYRIM")
End Sub
Sub fps()
Me.cboffline.Items.Clear()
Me.cboffline.Items.Add("CS")
Me.cboffline.Items.Add("COD (SERIES)")
Me.cboffline.Items.Add("BATTLEFIELD")
Me.cboffline.Items.Add("ENEMY FRONT")
Me.cboffline.Items.Add("FARCRY (SERIES)")
End Sub
Sub sim()
Me.cboffline.Items.Clear()
Me.cboffline.Items.Add("The SIMS (SERIES)")
Me.cboffline.Items.Add("Train Simulator")
Me.cboffline.Items.Add("SIMS CITY")
End Sub
'Menampilkan sub pilihan yang ada didalam tiap kategori pada menu combo box
Private Sub rbsport_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rbsport.CheckedChanged
sports()
End Sub
Private Sub rbrpg_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rbrpg.CheckedChanged
rpg()
End Sub
Private Sub rbfps_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rbfps.CheckedChanged
fps()
End Sub
Private Sub rbsim_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rbsim.CheckedChanged
sim()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnew.Click
bersih()
End Sub
'Menampilkan jumlah biaya dari perincian lama menyewa saat "combo lama" di klik yang kemudian di akan muncul pada "text box lama"
Private Sub cblama_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cblama.SelectedIndexChanged
If Me.cblama.Text = "3 Hari" Then
Me.txtlama.Text = 10000
ElseIf Me.cblama.Text = "4 Hari" Then
Me.txtlama.Text = 12000
ElseIf Me.cblama.Text = "5 Hari" Then
Me.txtlama.Text = 14000
ElseIf Me.cblama.Text = "6 Hari" Then
Me.txtlama.Text = 16000
ElseIf Me.cblama.Text = "7 Hari" Then
Me.txtlama.Text = 18000
End If
End Sub
'Untuk Menampilkan DVD Game Yang dipilih beserta harga dari tiap DVD tersebut saat setelah "combo box nama game" di klik setelah itu akan muncul perincian biaya pada "text box harga"
Private Sub cboffline_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboffline.SelectedIndexChanged
If Me.cboffline.Text = "GTA SAN" Then
Me.txtharga.Text = 10000
ElseIf Me.cboffline.Text = "NARUTO" Then
Me.txtharga.Text = 12000
ElseIf Me.cboffline.Text = "GTA IV" Then
Me.txtharga.Text = 14000
ElseIf Me.cboffline.Text = "WATCH DOG" Then
Me.txtharga.Text = 13000
ElseIf Me.cboffline.Text = "SKYRIM" Then
Me.txtharga.Text = 14000
End If
If Me.cboffline.Text = "CS" Then
Me.txtharga.Text = 10000
ElseIf Me.cboffline.Text = "COD (SERIES)" Then
Me.txtHarga.Text = 14000
ElseIf Me.cboffline.Text = "ENEMY FRONT" Then
Me.txttharga.Text = 14000
ElseIf Me.cboffline.Text = "FARCRY (SERIES)" Then
Me.txttharga.Text = 15000
End If
If Me.cboffline.Text = "PES 2013" Then
Me.txtHarga.Text = 10000
ElseIf Me.cboffline.Text = "PES 2014" Then
Me.txtHarga.Text = 12000
ElseIf Me.cboffline.Text = "FIFA 2013" Then
Me.txtharga.Text = 10000
ElseIf Me.cboffline.Text = "FIFA 2014" Then
Me.txtHarga.Text = 12000
ElseIf Me.cboffline.Text = "FIFA 2013" Then
Me.txtHarga.Text = 10000
End If
If Me.cboffline.Text = "The SIMS (SERIES)" Then
Me.txtHarga.Text = 10000
ElseIf Me.cboffline.Text = "Train Simulator" Then
Me.txtHarga.Text = 12000
ElseIf Me.cboffline.Text = "SIMS CITY" Then
Me.txtHarga.Text = 14000
End If
End Sub
Private Sub bthitung_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bthitung.Click
'Untuk Mencari Jumlah dari sub harga = "Harga + Lama waktu penyewaan"
Dim b1, b2 As New Integer
Dim h As New Double
b1 = Val(txttotal.Text)
b2 = Val(txtjumlah.Text)
h = b2 - b1
txtkembali.Text = h
End Sub
Private Sub btclose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btclose.Click
If MsgBox("Thank You, Please Support Me for the next Project", MsgBoxStyle.Critical, "ARIGATOU") Then
Else
End If
Me.Close()
End Sub
'Untuk Mencari Jumlah dari sub harga = "Harga + Lama waktu penyewaan"
Private Sub btkembali_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btkembali.Click
Dim b1, b2 As New Integer
Dim h As New Double
b1 = Val(txtharga.Text)
b2 = Val(txtlama.Text)
h = b1 + b2
txttotal.Text = h.
End Sub
End Class
Tag :
TUTOR VB.NET
0 Komentar untuk "Program VB.net Sederhana "Program Retail DVD Games""