Tugas Praktikum 4 | Array Dimensi Dua Kasus 1
Awesome Image

Kasus 1

Source Code :

Public Class Kasus1
    '2017230092
    'Naufal Farisi Zamzam
    Private Sub Kasus1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.Text = "NAUFAL FARISI ZAMZAM"
        Dim arr(3, 1) As String
        arr(0, 0) = "BARANG"
        arr(0, 1) = "BARCODE"
        arr(1, 0) = "SUPPLIER"
        arr(1, 1) = "KONDISI"
        arr(2, 0) = "JJLAPCABLE"
        arr(2, 1) = "WUMBOCABLE"
        arr(3, 0) = "LENGKAP"
        arr(3, 1) = "TIDAKLENGKAP"
        ListView1.GridLines = True
        ListView1.View = View.Details
        For baris = 0 To 1
            For kolom = 0 To 1
                ListView1.Columns.Add(arr(baris, kolom), 100)
            Next
        Next
        For baris = 2 To 2
            For kolom = 0 To 1
                ComboBox1.Items.Add(arr(baris, kolom))
            Next
        Next
        For baris = 3 To 3
            For kolom = 0 To 1
                ComboBox2.Items.Add(arr(baris, kolom))
            Next
        Next
        TextBox1.Focus()
    End Sub
 
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim arr(4) As String
        arr(0) = TextBox1.Text
        arr(1) = TextBox2.Text
        arr(2) = ComboBox1.Text
        arr(3) = ComboBox2.Text
        Dim list As New ListViewItem
        list = ListView1.Items.Add(arr(0))
        list.SubItems.Add(arr(1))
        list.SubItems.Add(arr(2))
        list.SubItems.Add(arr(3))
        TextBox1.Text = ""
        TextBox2.Text = ""
        ComboBox1.Text = ""
        ComboBox2.Text = ""
    End Sub
 
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim psn As String
        psn = MsgBox("Yakin Mau Cabut?", vbYesNo, "naufalfz.my.id")
        If psn = vbYes Then
            End
        End If
    End Sub
End Class