berikut saya share coding Program Aplikasi Menghitung Nilai Mahasiswa menggunakan List View
Sub Tabel()
lv.Columns.Add("Npm",
80, HorizontalAlignment.Center)
lv.Columns.Add("Nama",
150, HorizontalAlignment.Left)
lv.Columns.Add("Mata
Kuliah", 190, HorizontalAlignment.Left)
lv.Columns.Add("UTS
", 100, HorizontalAlignment.Left)
lv.Columns.Add("UAS",
100, HorizontalAlignment.Left)
lv.Columns.Add("HADIR",
100, HorizontalAlignment.Left)
lv.Columns.Add("Tugas",
100, HorizontalAlignment.Left)
lv.Columns.Add("Nilai
ANGKA", 100, HorizontalAlignment.Left)
lv.Columns.Add("Nilai
Huruf", 100, HorizontalAlignment.Left)
lv.View = View.Details
lv.GridLines = True
lv.FullRowSelect = True
End Sub
Sub
isitabel()
Dim isi As New ListViewItem
isi.Text = npm.Text
isi.SubItems.Add(nama.Text)
isi.SubItems.Add(matakuliah.Text)
isi.SubItems.Add(NUts.Text)
isi.SubItems.Add(NUas.Text)
isi.SubItems.Add(nHadir.Text)
isi.SubItems.Add(nTugas.Text)
isi.SubItems.Add(Nangka.Text)
isi.SubItems.Add(NHuruf.Text)
lv.Items.Add(isi)
End Sub
Private Sub Form1_Load(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Call
Tabel()
matakuliah.Items.Add("Pemograman Visual")
npm.Items.Add("13110210")
End Sub
Private Sub btnIsilist_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles btnIsilist.Click
Call
isitabel()
End Sub
Private Sub btnProses_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles btnProses.Click
Nangka.Text = 0.3 * NUts.Text + 0.45 *
NUas.Text + 0.1 * nHadir.Text + 0.15 * nTugas.Text
If
Nangka.Text >= 95 Then
NHuruf.Text = "A+"
ElseIf
Nangka.Text >= 85 Then
NHuruf.Text = "A"
ElseIf
Nangka.Text >= 80 Then
NHuruf.Text = "B+"
ElseIf
Nangka.Text >= 75 Then
NHuruf.Text = "B"
ElseIf
Nangka.Text >= 65 Then
NHuruf.Text = "C+"
ElseIf
Nangka.Text >= 50 Then
NHuruf.Text = "C"
ElseIf
Nangka.Text >= 49 Then
NHuruf.Text = "D"
ElseIf
Nangka.Text >= 10 Then
NHuruf.Text = "E"
Else
NHuruf.Text = 0
End If
End Sub
Private Sub btnkeluar_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles btnkeluar.Click
Me.Close()
End Sub
Private Sub btnHlist_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles btnHlist.Click
lv.Items.Clear()
End Sub
Private Sub btnhNPM_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles btnhNPM.Click
lv.Items.Remove(lv.SelectedItems.Item(0))
End Sub
Private Sub btnHdata_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles btnHdata.Click
lv.Items.Clear()
End Sub
Private Sub npm_SelectedIndexChanged(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles
npm.SelectedIndexChanged
If
npm.Text = "13110369" Then
nama.Text = "ZULFAN ANUGERAH ZEGA"
Else
nama.Text = 0
End If
End Sub
End Class
semoga bermanfaat.... ^_^