Contoh membuat background warna dengan atribut style background-color.
Public Class Form2
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
NPM.Items.Add("12110222")
NPM.Items.Add("12110993")
NPM.Items.Add("12110227")
KD.Items.Add("100")
KD.Items.Add("101")
KD.Items.Add("111")
KM.Items.Add("123")
KM.Items.Add("234")
KM.Items.Add("345")
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
NU.Items.Add(k)
Next k
Dim l As Integer
For l = 50 To 100
NUAS.Items.Add(l)
Next l
End Sub
Private Sub ComboBox1_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 "12110993"
Nama.Text = "Lelita Marnaida Hutasuhut"
Case "12110227"
Nama.Text = "Evi Roseva"
End Select
Select Case NPM.Text
Case "12110222"
Jenjang.Text = "S1"
Case "12110993"
Jenjang.Text = "D3'"
Case "12110227"
Jenjang.Text = "D1"
End Select
Select Case NPM.Text
Case "12110222"
Jurusan.Text = "Teknik Informatika"
Case "12110993"
Jurusan.Text = "Sistem Informasi"
Case "12110227"
Jurusan.Text = "Sistem Informasi"
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 * NU.Text + 0.4 * NUAS.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
Private Sub KM_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KM.SelectedIndexChanged
Select Case KM.Text
Case "123"
MK.Text = "Pemrograman Visual"
Case "234"
MK.Text = "HTML"
Case "345"
MK.Text = "Logika dan Algritma"
End Select
End Sub
Private Sub KD_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KD.SelectedIndexChanged
Select Case KD.Text
Case "100"
ND.Text = "Mesran,S.Kom,M.Kom"
Case "101"
ND.Text = "Christian Siregar"
Case "111"
ND.Text = "Tonni Limbong,S.Kom,M.Kom"
End Select
End Sub
Contoh membuat background warna dengan atribut style background-color.
Private Sub BtnKeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnKeluar.Click
End
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 = ""
MK.Text = ""
NK.Text = ""
NT.Text = ""
NU.Text = ""
NUAS.Text = ""
NA.Text = ""
NH.Text = ""
Ket.Text = ""
End Sub
End Class
Tidak ada komentar:
Posting Komentar