Selasa, 21 November 2017

huruf mutu dengan menggunakan keypress

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

Select Case Cbonpm.Text
Case "17100034"
nama = "Marisca nova linda"
jurusan = " Sistem Informasi"
Case "17100011"
nama = "Ariansyah"
jurusan = " Sistem Informasi"
Case "17100014"
nama = "Dwi Agustina"
jurusan = "Manajemen Informatika"
Case "17100028"
nama = "Ida Ayu Wulandari"
jurusan = "Tehnik Informatika"
Case "17100001"
nama = "Mardalenna"
jurusan = "Sistem Informasi"

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 "17100034"
Cbonpm.AddItem "17100011"
Cbonpm.AddItem "17100014"
Cbonpm.AddItem "17100028"
Cbonpm.AddItem "17100001"

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

Tidak ada komentar:

Posting Komentar

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

Untuk menggambar grafik 3- dimensi memerlukan suatu titik koordinat yaitu x,y, dan z atau bisa disebut array. Fungsi-fungsi dari visu...