0. Judul postingan Yuk! Belajar Pemrograman Visual Basic dot Net Di Mesran.Net
1. Selesaikanlah Kasus Berikut ini : JUDUL SOAL ANDA DAN DI LINK KE POSTINGAN SOAL
2. Berikut jawabannya terlihat seperti dibawah ini :
3. Pada Bagian bawah postingan buat seperti ini
Demikilahlah postingan saya Nama : Ita Purnama NPM : 11113717
Selamat Belajar Pemrograman VB Net ( Pemrograman VB Net di LINK ke http://mesran.net )
4. Terakhir kirimkan koment anda di Cara Menjawab Quiz Online Pemrograman Visual Basic dot Net ( S1 ) dengan menuliskan Nama, NPM, Kelas, Link Postingannya.
OK ! Lihat bentuknya.
___________________________________________________________________________
Selesaikanlah Kasus Berikut ini : JUDUL SOAL ANDA DAN DI LINK KE POSTINGAN SOAL
Berikut jawabannya terlihat seperti dibawah ini :
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
buattabel()
KD.Items.Add("TS001")
KD.Items.Add("TS002")
KD.Items.Add("VG001")
KD.Items.Add("VG002")
End Sub
Sub buattabel()
LV.Columns.Add("NO.PEMBELIAN", 100, HorizontalAlignment.Center)
LV.Columns.Add("KODE BARANG", 100, HorizontalAlignment.Center)
LV.Columns.Add("NAMA BARANG", 100, HorizontalAlignment.Center)
LV.Columns.Add("MERK", 100, HorizontalAlignment.Center)
LV.Columns.Add("HARGA", 100, HorizontalAlignment.Center)
LV.Columns.Add("JUMLAH BELI", 100, HorizontalAlignment.Center)
LV.Columns.Add("TOTAL HARGA", 100, HorizontalAlignment.Center)
LV.View = View.Details
LV.GridLines = True
LV.FullRowSelect = True
End Sub
Sub IsiTabel()
Dim Lst As New ListViewItem
Lst.Text = NO.Text
Lst.SubItems.Add(KD.Text)
Lst.SubItems.Add(NB.Text)
Lst.SubItems.Add(MERK.Text)
Lst.SubItems.Add(HARGA.Text)
Lst.SubItems.Add(JB.Text)
Lst.SubItems.Add(TH.Text)
LV.Items.Add(Lst)
End Sub
Private Sub KD_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KD.SelectedIndexChanged
Dim x As String
x = Microsoft.VisualBasic.Left(KD.Text, 2)
If x = "TS" Then
MERK.Text = "TOSHIBA"
ElseIf x = "VG" Then
MERK.Text = "V-GEN"
End If
Dim y As String
y = Microsoft.VisualBasic.Mid(KD.Text, 3)
If y = "001" Then
NB.Text = "FLASHDISK 4GB"
ElseIf y = "002" Then
NB.Text = "FLASHDISK 2GB"
End If
Dim z As String
z = Microsoft.VisualBasic.Left(KD.Text, 5)
If z = "TS001" Then
HARGA.Text = "105000"
ElseIf z = "TS002" Then
HARGA.Text = "75000"
ElseIf z = "VG001" Then
HARGA.Text = "90000"
ElseIf z = "VG002" Then
HARGA.Text = "60000"
End If
End Sub
Private Sub JB_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles JB.TextChanged
TH.Text = HARGA.Text * JB.Text
End Sub
Private Sub JB_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles JB.KeyPress
Dim TOMBOL As Integer = Asc(e.KeyChar)
If TOMBOL = 13 Then
BTNSIMPAN_Click(sender, e)
End If
End Sub
Private Sub BTNSIMPAN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTNSIMPAN.Click
IsiTabel()
NO.Text = " "
KD.Text = " "
NB.Text = " "
MERK.Text = " "
HARGA.Text = " "
JB.Text = " "
TH.Text = " "
End Sub
Private Sub BTNHAPSEM_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTNHAPSEM.Click
LV.Items.Clear()
End Sub
Private Sub BTNHAPDAT_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTNHAPDAT.Click
LV.Items.Remove(LV.SelectedItems(0))
End Sub
Private Sub BTNBERSIH_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTNBERSIH.Click
NO.Text = " "
KD.Text = " "
NB.Text = " "
MERK.Text = " "
HARGA.Text = " "
JB.Text = " "
TH.Text = " "
End Sub
Private Sub BTNKELUAR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTNKELUAR.Click
End
End Sub
End Class
Hasil program
Demikilahlah postingan saya Nama : Ita Purnama NPM : 11113717
Selamat Belajar Pemrograman VB Net
_________________________________________________________________
Seperti itulah yang saya harapkan dari postingan anda, jika belum seperti itu, silahkan edit postingan anda sesuai dengan instruksi saya di Cara Menjawab Quiz Online Pemrograman Visual Basic dot Net ( S1 )
Silahkan memperbaiki postingan anda, sebelum saya melakukan penilaian.
pak mesran soal quiz online nya yg di Related artiles ya pak... mohon bantuannya pak...
ReplyDeleteNAMA; IMAM WAHYUDI HANDOKO
ReplyDeleteNPM ; 13110678
KELAS ; TI - M 1316
http://imamwahyudihandoko@gmail.com/http://mesran.blogspot.com/2013/06/yuk-belajar-pemrograman-visual-basic_3.html#comment-form