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("12110222")
NPM.Items.Add("12110227")
NPM.Items.Add("12110993")
KD.Items.Add("01")
KD.Items.Add("02")
KD.Items.Add("03")
KM.Items.Add("001")
KM.Items.Add("002")
KM.Items.Add("003")
Dim x As Integer
For x = 100 To 1 Step -1
NK.Items.Add(x)
NT.Items.Add(x)
UTS.Items.Add(x)
UAS.Items.Add(x)
Next x
RancangTable()
End Sub
Private Sub NPM_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NPM.SelectedIndexChanged
Select Case NPM.Text
Case "12110222"
Nama.Text = "Putri Rahmadani"
Case "12110227"
Nama.Text = "Evi Roseva"
Case "12110993"
Nama.Text = "Lelita Marnaida Hts"
End Select
Select Case NPM.Text
Case "12110222"
Jenjang.Text = "S1"
Case "12110227"
Jenjang.Text = "D3"
Case "12110993"
Jenjang.Text = "D1"
End Select
Select Case NPM.Text
Case "12110222"
Jurusan.Text = "Teknik Informatika"
Case "12110227"
Jurusan.Text = "Sistem Informasi"
Case "12110993"
Jurusan.Text = "Akuntansi"
End Select
End Sub
Private Sub KM_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KM.SelectedIndexChanged
Select Case KM.Text
Case "001"
Matakuliah.Text = "Pemrograman Visual"
Case "002"
Matakuliah.Text = "Logika dan Algoritma"
Case "003"
Matakuliah.Text = "HTML"
End Select
End Sub
Private Sub BtnProses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnProses.Click
NA.Text = 0.1 * NK.Text + 0.15 * NT.Text + 0.35 * UTS.Text + 0.4 * UAS.Text
If NA.Text >= 55 Then
ket.Text = "LULUS"
Else
ket.Text = "GAGAL"
End If
If NA.Text >= 80 Then
NH.Text = "A"
ElseIf NA.Text >= 70 Then
NH.Text = "B"
ElseIf NA.Text >= 60 Then
NH.Text = "C"
ElseIf NA.Text >= 50 Then
NH.Text = "D"
Else
NH.Text = "E"
End If
IsiTable()
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 = ""
KD.Text = ""
ND.Text = ""
KM.Text = ""
Matakuliah.Text = ""
NK.Text = ""
NT.Text = ""
UTS.Text = ""
UAS.Text = ""
NA.Text = ""
NH.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 KD_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KD.SelectedIndexChanged
Select Case KD.Text
Case "01"
ND.Text = "Mesran,S.Kom,M.Kom"
Case "02"
ND.Text = "Tonni Limbong,S.Kom,M.Kom"
Case "03"
ND.Text = "Kristian Siregar,S.Kom"
End Select
End Sub
Private Sub Nama_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Nama.TextChanged
End Sub
Sub RancangTable()
ListView1.Columns.Add("NPM", 80, HorizontalAlignment.Left)
ListView1.Columns.Add("Nama", 80, HorizontalAlignment.Left)
ListView1.Columns.Add("Jenjang", 80, HorizontalAlignment.Left)
ListView1.Columns.Add("Jurusan", 80, HorizontalAlignment.Left)
ListView1.Columns.Add("KD", 80, HorizontalAlignment.Left)
ListView1.Columns.Add("ND", 80, HorizontalAlignment.Left)
ListView1.Columns.Add("KM", 80, HorizontalAlignment.Left)
ListView1.Columns.Add("Matakuliah", 80, HorizontalAlignment.Left)
ListView1.Columns.Add("NK", 80, HorizontalAlignment.Left)
ListView1.Columns.Add("ND", 80, HorizontalAlignment.Left)
ListView1.Columns.Add("NT", 80, HorizontalAlignment.Left)
ListView1.Columns.Add("UTS", 80, HorizontalAlignment.Left)
ListView1.Columns.Add("UAS", 80, HorizontalAlignment.Left)
ListView1.Columns.Add("NA", 80, HorizontalAlignment.Left)
ListView1.Columns.Add("NH", 80, HorizontalAlignment.Left)
ListView1.Columns.Add("ket", 80, HorizontalAlignment.Left)
ListView1.GridLines = True
ListView1.FullRowSelect = False
ListView1.View = View.Details
End Sub
Sub IsiTable()
Dim lst As New ListViewItem
lst.Text = NPM.Text
lst.SubItems.Add(Nama.Text)
lst.SubItems.Add(Jenjang.Text)
lst.SubItems.Add(Jurusan.Text)
lst.SubItems.Add(KD.Text)
lst.SubItems.Add(ND.Text)
lst.SubItems.Add(KM.Text)
lst.SubItems.Add(Matakuliah.Text)
lst.SubItems.Add(NK.Text)
lst.SubItems.Add(ND.Text)
lst.SubItems.Add(NT.Text)
lst.SubItems.Add(UTS.Text)
lst.SubItems.Add(UAS.Text)
lst.SubItems.Add(NA.Text)
lst.SubItems.Add(NH.Text)
lst.SubItems.Add(ket.Text)
ListView1.Items.Add(lst)
End Sub
End Class
hasil program
Minggu, 08 Desember 2013
Kamis, 07 November 2013
PROGRAM PENCARIAN NILAI
PROGRAM PENCARIAN NILAI
Designlah Program Berikut :
Berikut ini Listing Programnya:
Public Class Form1
Private Sub Form1_Load(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
NPM.Items.Add("12110222")
NPM.Items.Add("12110227")
NPM.Items.Add("12110993")
KD.Items.Add("01")
KD.Items.Add("02")
KD.Items.Add("03")
KM.Items.Add("001")
KM.Items.Add("002")
KM.Items.Add("003")
Dim i As Integer
For i =
50 To 100
NK.Items.Add(i)
Next i
Dim j As Integer
For j =
50 To 100
NT.Items.Add(j)
Next j
Dim k As Integer
For k =
50 To 100
UTS.Items.Add(k)
Next k
Dim l As Integer
For l =
50 To 100
UAS.Items.Add(l)
Next l
End Sub
Private Sub NPM_SelectedIndexChanged(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles
NPM.SelectedIndexChanged
Select Case NPM.Text
Case
"12110222"
Nama.Text = "Putri Rahmadani"
Case
"12110227"
Nama.Text = "Evi Roseva"
Case
"12110993"
Nama.Text = "Lelita Marnaida Hts"
End Select
Select Case NPM.Text
Case
"12110222"
Jenjang.Text = "S1"
Case
"12110227"
Jenjang.Text = "D3"
Case
"12110993"
Jenjang.Text = "D1"
End Select
Select Case NPM.Text
Case
"12110222"
Jurusan.Text = "Teknik Informatika"
Case
"12110227"
Jurusan.Text = "Sistem Informasi"
Case
"12110993"
Jurusan.Text = "Akuntansi"
End Select
End Sub
Private Sub KM_SelectedIndexChanged(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles
KM.SelectedIndexChanged
Select Case KM.Text
Case
"001"
Matakuliah.Text = "Pemrograman Visual"
Case
"002"
Matakuliah.Text = "Logika dan Algoritma"
Case
"003"
Matakuliah.Text = "HTML"
End Select
End Sub
Private Sub
BtnProses_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles
BtnProses.Click
NA.Text = 0.1 * NK.Text + 0.15 *
NT.Text + 0.35 * UTS.Text + 0.4 * UAS.Text
If
NA.Text >= 55 Then
ket.Text = "LULUS"
Else
ket.Text = "GAGAL"
End If
If
NA.Text >= 80 Then
NH.Text = "A"
ElseIf
NA.Text >= 70 Then
NH.Text = "B"
ElseIf
NA.Text >= 60 Then
NH.Text = "C"
ElseIf
NA.Text >= 50 Then
NH.Text = "D"
Else
NH.Text = "E"
End If
End Sub
Select Case KD.Text
Case
"01"
ND.Text = "Mesran,S.Kom,M.Kom"
Case
"02"
ND.Text = "Tonni Limbong,S.Kom,M.Kom"
Case
"03"
ND.Text = "Kristian Siregar,S.Kom"
End Select
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 = ""
KD.Text = ""
ND.Text = ""
KM.Text = ""
Matakuliah.Text = ""
NK.Text = ""
NT.Text = ""
UTS.Text = ""
UAS.Text = ""
NA.Text = ""
NH.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
End Class
Dan Berikut
ini adalah Hasil Programnya:
Langganan:
Postingan (Atom)