Listing Program :
Public Class Form1
Private Sub Form1_Load(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
buattabel()
End Sub
Sub
buattabel()
Lv.Columns.Add("NPM",
80, HorizontalAlignment.Center)
Lv.Columns.Add("Nama",
100, HorizontalAlignment.Center)
Lv.View = View.Details
Lv.GridLines = True
Lv.FullRowSelect = True
End Sub
Sub
isitabel()
Dim lst
As New
ListViewItem
lst.Text = npm.Text
lst.SubItems.Add(nama.Text)
Lv.Items.Add(lst)
End Sub
Private Sub BtnSimpan_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles BtnSimpan.Click
isitabel()
NPM.Text = ""
Nama.Text = ""
End Sub
End Class
Berikut Hasilnya :
Tidak ada komentar