Yaitu membuat desain program mencari nilai
mahasiswa seperti gambar dibawah:
Untuk mengolah isi data program di atas
Ini lah formnya :
Public Class Form1
Private Sub TextBox8_TextChanged(ByVal
sender As
System.Object, ByVal e As System.EventArgs) Handles Ket.TextChanged
End Sub
Private Sub Form1_Load(ByVal
sender As
System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Npm.Items.Add("12110325")
Npm.Items.Add("12113456")
Npm.Items.Add("12115467")
Npm.Items.Add("12110078")
Npm.Items.Add("12110545")
KdDosen.Items.Add("MS001")
KdDosen.Items.Add("KS002")
KdDosen.Items.Add("TL003")
KdMk.Items.Add("VB")
KdMk.Items.Add("HT")
KdMk.Items.Add("SBD")
Dim x As Integer
For x = 100 To 30 Step -5
NilaiKehadiran.Items.Add(x)
Nilaitugas.Items.Add(x)
NilaiUTS.Items.Add(x)
NilaiUAS.Items.Add(x)
Next x
End
Sub
Private Sub BtnProses_Click(ByVal
sender As
System.Object, ByVal e As System.EventArgs) Handles BtnProses.Click
NilaiAkhr.Text = 0.15 * Nilaitugas.Text +
0.35 * NilaiUTS.Text + 0.1 * NilaiKehadiran.Text + 0.45 * NilaiUAS.Text
If NilaiAkhr.Text >= 80 Then
NilaiHrf.Text = "A"
Ket.Text = "LULUS"
ElseIf NilaiAkhr.Text >= 70 Then
NilaiHrf.Text = "B"
Ket.Text = "LULUS"
ElseIf NilaiAkhr.Text >= 60 Then
NilaiHrf.Text = "c"
Ket.Text = "LULUS"
ElseIf NilaiAkhr.Text >= 50 Then
NilaiHrf.Text = "D"
Ket.Text = "LULUS"
Else
NilaiHrf.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 = ""
KdDosen.Text = ""
NamaDsn.Text = ""
KdMk.Text = ""
Mkuliah.Text = ""
NilaiKehadiran.Text = ""
Nilaitugas.Text = ""
NilaiUTS.Text = ""
NilaiUAS.Text = ""
NilaiAkhr.Text = ""
NilaiHrf.Text = ""
Ket.Text = ""
End
Sub
Private
Sub BtnKeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles
BtnKeluar.Click
End
End Sub
Private
Sub Npm_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Npm.SelectedIndexChanged
Select Case Npm.Text
Case "12110325"
Nama.Text = "Mutiara Kasih"
Jenjang.Text = "S1"
Jurusan.Text = "Teknik Informatika"
Case "12113456"
Nama.Text = "Renata"
Jenjang.Text = "DIII"
Jurusan.Text = "Manajemen Komputer"
Case "12115467"
Nama.Text = "Divana"
Jenjang.Text = "S1"
Jurusan.Text = "Sistem Informasi"
Case "12110078"
Nama.Text = "Diana"
Jenjang.Text = "DIII"
Jurusan.Text = "Manajemen Informatika"
Case "12110545"
Nama.Text = "Kartika Sari"
Jenjang.Text = "S1"
Jurusan.Text = "Sistem Informasi"
End Select
End
Sub
Private Sub KdDosen_SelectedIndexChanged(ByVal
sender As
System.Object, ByVal e As System.EventArgs) Handles
KdDosen.SelectedIndexChanged
Select Case KdDosen.Text
Case "MS001"
NamaDsn.Text = "Mesran S.Kom, M.Kom"
Case "KS002"
NamaDsn.Text = "Kristian Siregar S.Kom"
Case "TL003"
NamaDsn.Text = "Toni Limbong M.Kom"
End Select
End
Sub
Private
Sub KdMk_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles KdMk.SelectedIndexChanged
Select Case KdMk.Text
Case "VB"
Mkuliah.Text = "Visual Basic"
Case "HT"
Mkuliah.Text = "HTML"
Case "SBD"
Mkuliah.Text = "Sistem Basis Data"
End Select
End
Sub
End Class
Inilah Hasil desain saya