Desain Form seperti di bawah ini:
Listing Program
Public Class Form1
Private Sub Form1_Load(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
NPM.Items.Add("12110209")
NPM.Items.Add("12110208")
NPM.Items.Add("12110207")
NPM.Items.Add("12110206")
NPM.Items.Add("12110205")
K_dosen.Items.Add("MS001")
K_dosen.Items.Add("TL002")
K_dosen.Items.Add("SS003")
K_MK.Items.Add("PV")
K_MK.Items.Add("SBD")
K_MK.Items.Add("MD")
Dim x As Integer
For x =
100 To 30 Step
-5
NK.Items.Add(x)
NT.Items.Add(x)
N_UTS.Items.Add(x)
N_UAS.Items.Add(x)
Next x
End Sub
Private Sub BTNProses_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles BTNProses.Click
NA.Text = 0.15 * NT.Text + 0.35 *
N_UTS.Text + 0.1 * NK.Text + 0.45 * N_UAS.Text
If
NA.Text >= 80 Then
NH.Text = "A"
Ket.Text = "LULUS"
ElseIf
NA.Text >= 70 Then
NH.Text = "B"
Ket.Text = "LULUS"
ElseIf
NA.Text >= 60 Then
NH.Text = "C"
Ket.Text = "LULUS"
ElseIf
NA.Text >= 50 Then
NH.Text = "D"
Ket.Text = "GAGAL"
Else
NH.Text = "E"
Ket.Text = "GAGAL"
End If
End Sub
Private Sub BTNHapus_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles BTNHapus.Click
NPM.Text = ""
Nama.Text = ""
Jenjang.Text = ""
Jurusan.Text = ""
K_dosen.Text = ""
N_dosen.Text = ""
K_MK.Text = ""
MK.Text = ""
NK.Text = ""
NT.Text = ""
N_UTS.Text = ""
N_UAS.Text = ""
NA.Text = ""
NH.Text = ""
Ket.Text = ""
End Sub
Private Sub NPM_SelectedIndexChanged(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles
NPM.SelectedIndexChanged
Select Case NPM.Text
Case
"12110209"
Nama.Text = "Devi Andriyani"
Jenjang.Text = "S1"
Jurusan.Text = "Teknik Informatika"
Case
"12110208"
Nama.Text = "Meliza"
Jenjang.Text = "S1"
Jurusan.Text = "Sistem Informasi"
Case
"12110207"
Nama.Text = "Fitri Yani"
Jenjang.Text = "D3"
Jurusan.Text = "Manajemen Informatika"
Case
"12110206"
Nama.Text = "Asnita"
Jenjang.Text = "D3"
Jurusan.Text = "Manajemen Informatika"
Case
"12110205"
Nama.Text = "Dhiva Septhia"
Jenjang.Text = "S1"
Jurusan.Text = "Sistem Informasi"
End Select
End Sub
Private Sub K_dosen_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As
System.EventArgs) Handles
K_dosen.SelectedIndexChanged
Select Case K_dosen.Text
Case
"MS001"
N_dosen.Text = "Mesran S.kom, M.kom"
Case
"TL002"
N_dosen.Text = "Tonni Limbong S.kom, M.kom"
Case
"SS003"
N_dosen.Text = "Sinar Sinurat ST, M.kom"
End Select
End Sub
Private Sub K_MK_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles
K_MK.SelectedIndexChanged
Select Case K_MK.Text
Case
"PV"
MK.Text = "Pemograman Visual"
Case
"SBD"
MK.Text = "Sistem Basis Data"
Case
"MD"
MK.Text = "Matematika Diskrit"
End Select
End Sub
Private Sub BTNKeluar_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles BTNKeluar.Click
End
End Sub
End Class
Hasil Program
Tidak ada komentar:
Posting Komentar