Sharing is Cool...!!!

Teknologi, Tips & Trick, ilmu, Games, Movies, dan TUGAS KAMPUS saya...

Minggu, 09 Desember 2012

Contoh Program biodata mahasiswa Vb 2008

Contoh Program Vb 2008



Public Class Form3
'membuat Variabel array

Dim listtxt(3) As String
Dim listitem As ListViewItem


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

'memasukkan nilai ke variabel array
listtxt(0) = Trim(TextBox1.Text)
listtxt(1) = Trim(TextBox2.Text)
listtxt(2) = Trim(TextBox3.Text)

'untuk memasukkan ke listview dari variabel array
listitem = New ListViewItem(listtxt)
ListView1.Items.Add(listitem)

End Sub


'setting kolom listview
Sub setlistview()

ListView1.View = View.Details

'untuk menentukan kolom
ListView1.Columns.Add("NPM", 100, HorizontalAlignment.Center)
ListView1.Columns.Add("Nama", 200, HorizontalAlignment.Left)
ListView1.Columns.Add("Alamat", 400, HorizontalAlignment.Left)

End Sub


Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Call setlistview()
End Sub



Private Sub ListView1_ItemSelectionChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.ListViewItemSelectionChangedEventArgs) Handles ListView1.ItemSelectionChanged
'mengambil nilai dari listview
TextBox4.Text = e.Item.Text

End Sub


Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged

End Sub
End Class

1 komentar:

Anonim mengatakan...

minimal pake
prosesor apa sih buat bisa ngejalanin vb?