JUDUL SOAL (http://mesran.net/quiz.html)
Berikut Jawaban Program :
Ini Design dari Formnya:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Call BuatTable()
Nsem.Enabled = False
ket.Enabled = False
End Sub
Sub BuatTable()
LV.Columns.Add("NPM", 70, HorizontalAlignment.Center)
LV.Columns.Add("NAMA", 140, HorizontalAlignment.Left)
LV.Columns.Add("KELAS", 80, HorizontalAlignment.Left)
LV.Columns.Add("SEMESTER", 95, HorizontalAlignment.Center)
LV.Columns.Add("NILAI MID", 100, HorizontalAlignment.Center)
LV.Columns.Add("NILAI UAS", 100, HorizontalAlignment.Center)
LV.Columns.Add("NILAI SEM", 100, HorizontalAlignment.Center)
LV.Columns.Add("KETERANGAN", 120, HorizontalAlignment.Center)
LV.View = View.Details
LV.GridLines = True
LV.FullRowSelect = True
End Sub
Sub IsiTable()
Dim list As New ListViewItem
list.Text = npm.Text
list.SubItems.Add(nama.Text)
list.SubItems.Add(kelas.Text)
list.SubItems.Add(semester.Text)
list.SubItems.Add(Nmid.Text)
list.SubItems.Add(Nuas.Text)
list.SubItems.Add(Nsem.Text)
list.SubItems.Add(ket.Text)
LV.Items.Add(list)
End Sub
Private Sub Btn_isi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn_isi.Click
Call IsiTable()
npm.Text = ""
nama.Text = ""
kelas.Text = ""
semester.Text = ""
Nmid.Text = ""
Nuas.Text = ""
Nsem.Text = ""
ket.Text = ""
End Sub
Private Sub Btn_hapuslist_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn_hapuslist.Click
LV.Items.Clear()
End Sub
Private Sub Btn_hpssatulist_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn_hpssatulist.Click
LV.Items.Remove(LV.SelectedItems(0))
End Sub
Private Sub Btn_keluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn_keluar.Click
Dim rio As String
rio = MsgBox("Are You Sure Want To Quit?", MsgBoxStyle.OkCancel)
If rio = vbOK Then
End
End If
End Sub
Private Sub Btn_proses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn_proses.Click
Nsem.Text = 0.4 * Nmid.Text + 0.6 * Nuas.Text
If Nsem.Text >= 50 Then
ket.Text = "LULUS"
Else
ket.Text = "GAGAL"
End If
End Sub
End Class
Demikilahlah postingan saya Nama : (Rio Irwansyah) NPM : (13110915)
Selamat Belajar Pemrograman VB NET (http://mesran.net/)