huruf mutu mahasiswa stmik pakai keypress

Private Sub Cbonpm_Click()
Dim nama, jurusan, HM As String

Select Case Cbonpm.Text
Case "17100016"
nama = "yanna chairunisa alwahida"
jurusan = " Sistem Informasi"
Case "17100004"
nama = "eka kartika pertiwi"
jurusan = "sistem informasi"
Case "17100028"
nama = "Ida Ayu Wulandari"
jurusan = "Tehnik Informatika"
Case "17100001"
nama = "Mardalenna"
jurusan = "Sistem Informasi"
Case "17100021"
nama = "Ahmad Hilal Yusuf"
jurusan = "Manajemen Informatika"
End Select
txtnama.Text = nama
txtjurusan.Text = jurusan
txtquis.SetFocus
End Sub


Private Sub cmdbatal_Click()
Cbonpm.SetFocus
Cbonpm.Text = ""
txtnama.Text = ""
txtjurusan.Text = ""
txtquis.Text = ""
txttugas.Text = ""
txtuts.Text = ""
txtuas.Text = ""
txtna.Text = ""
txthm.Text = ""
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub cmdproses_Click()
Dim NA As Integer
Dim HM As String
quis = Val(txtquis.Text)
tugas = Val(txttugas.Text)
uts = Val(txtuts.Text)
uas = Val(txtuas.Text)
NA = Val(quis + tugas + uts + uas) / 4
txtna.Text = NA

Select Case txtna.Text
Case Is > 80
HM = "A"
Case Is > 70
HM = "B"
Case Is > 60
HM = "C"
Case Is > 50
HM = "D"
Case Is < 50
HM = "E"
End Select
txthm.Text = HM
End Sub

Private Sub Form_Load()
Cbonpm.AddItem "17100016"
Cbonpm.AddItem "17100004"
Cbonpm.AddItem "17100028"
Cbonpm.AddItem "17100001"
Cbonpm.AddItem "17100021"
End Sub

Private Sub txtquis_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txttugas.SetFocus
End If
End Sub

Private Sub txttugas_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtuts.SetFocus
End If
End Sub

Private Sub txtuas_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Dim NA As Integer
Dim HM As String
quis = Val(txtquis.Text)
tugas = Val(txttugas.Text)
uts = Val(txtuts.Text)
uas = Val(txtuas.Text)
NA = Val(quis + tugas + uts + uas) / 4
txtna.Text = NA

Select Case txtna.Text
Case Is > 80
HM = "A"
Case Is > 70
HM = "B"
Case Is > 60
HM = "C"
Case Is > 50
HM = "D"
Case Is < 50
HM = "E"
End Select
txthm.Text = HM
End If
End Sub

Private Sub txtuts_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtuas.SetFocus
End If
End Sub


Komentar

Postingan populer dari blog ini

PEMILIHAN MULI MEKHANAI

cara membuat grafik 3D Plots Surf, Mesh, dan Contour menggunakan matlab

STMIK PRINGSEWU GELAR POSDIKTI 2017 GELOMBANG 1