Selasa, 21 November 2017

2.8 Huruf Mutu Mahasiswa STMIK Pringsewu Menggunakan Keypress



Tugas 2.8 Huruf Mutu Mahasiswa STMIK Pringsewu Menggunakan Keypress


Private Sub cbonpm_click()
Dim nama, jurusan, hm As String

Select Case cbonpm.Text
Case "17100001"
nama = "Mardalena"
jurusan = "Sistem Informasi"
Case "17100002"
nama = "Bahadi Rhamadani"
jurusan = "Sistem Informasi"
Case "17100003"
nama = "Renaldi Zainal Arifin"
jurusan = "Sistem Informasi"
Case "17100004"
nama = "Eka Kartika"
jurusan = "Sistem Informasi"
Case "17100006"
nama = "Rosi elvia"
jurusan = "Sistem Informasi"
Case "17100008"
nama = "M.Galih algofur"
jurusan = "Sistem Informasi"
Case "17100010"
nama = "Novia Anggraini"
jurusan = "Sistem Informasi"
Case "17100011"
nama = "Ariansyah"
jurusan = "Sistem Informasi"
Case "17100012"
nama = "Dimas Apringga"
jurusan = "Sistem Informasi"
Case "17100013"
nama = "Irmanida Siswanti"
jurusan = "Sistem Informasi"
Case "17100014"
nama = "Dwi Agustina"
jurusan = "Sistem Informasi"
Case "17100016"
nama = "Yanna Chairunisa A"
jurusan = "Sistem Informasi"
End Select
txtnm.Text = nama
txtjr.Text = jurusan
txtquis.SetFocus
End Sub

Private Sub cmdbatal_Click()
cbonpm.SetFocus
cbonpm.Text = ""
txtnm.Text = ""
txtjr.Text = ""
txtquis.Text = ""
txtnt.Text = ""
txtuts.Text = ""
txtuas.Text = ""
txtna.Text = ""
txthm.Text = ""
End Sub


Private Sub cmdproses_Click()
Dim na As Integer
Dim hm As String
quis = Val(txtquis.Text)
tugas = Val(txtnt.Text)
uts = Val(txtuts.Text)
uas = Val(txtuas.Text)
na = (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 cmdkeluar_Click()
Unload Me
End Sub

Private Sub Form_Load()
cbonpm.AddItem "17100001"
cbonpm.AddItem "17100002"
cbonpm.AddItem "17100003"
cbonpm.AddItem "17100004"
cbonpm.AddItem "17100006"
cbonpm.AddItem "17100008"
cbonpm.AddItem "17100010"
cbonpm.AddItem "17100011"
cbonpm.AddItem "17100012"
cbonpm.AddItem "17100013"
cbonpm.AddItem "17100014"
cbonpm.AddItem "17100016"
End Sub

Private Sub txtquis_keypress(keyascii As Integer)
If keyascii = 13 Then
txtnt.SetFocus
End If
End Sub

Private Sub Txtnt_keypress(keyascii As Integer)
If keyascii = 13 Then
txtuts.SetFocus
End If
End Sub

Private Sub txtuts_keypress(keyascii As Integer)
If keyascii = 13 Then
txtuas.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(txtnt.Text)
uts = Val(txtuts.Text)
uas = Val(txtuas.Text)
na = (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

2.7 Huruf Mutu Mahasiswa STMIK Pringsewu Tanpa Keypress



Tugas 2.7 Huruf Mutu Mahasiswa STMIK Pringsewu Tanpa Keypress


Private Sub cbonpm_click()
Dim nama, jurusan, hm As String

Select Case cbonpm.Text
Case "17100001"
nama = "Mardalena"
jurusan = "Sistem Informasi"
Case "17100002"
nama = "Bahadi Rhamadani"
jurusan = "Sistem Informasi"
Case "17100003"
nama = "Renaldi Zainal Arifin"
jurusan = "Sistem Informasi"
Case "17100004"
nama = "Eka Kartika"
jurusan = "Sistem Informasi"
Case "17100006"
nama = "Rosi elvia"
jurusan = "Sistem Informasi"
Case "17100008"
nama = "M.Galih algofur"
jurusan = "Sistem Informasi"
Case "17100010"
nama = "Novia Anggraini"
jurusan = "Sistem Informasi"
Case "17100011"
nama = "Ariansyah"
jurusan = "Sistem Informasi"
Case "17100012"
nama = "Dimas Apringga"
jurusan = "Sistem Informasi"
Case "17100013"
nama = "Irmanida Siswanti"
jurusan = "Sistem Informasi"
Case "17100014"
nama = "Dwi Agustina"
jurusan = "Sistem Informasi"
Case "17100016"
nama = "Yanna Chairunisa A"
jurusan = "Sistem Informasi"
End Select
txtnm.Text = nama
txtjr.Text = jurusan
txtquis.SetFocus
End Sub

Private Sub cmdbatal_Click()
cbonpm.SetFocus
cbonpm.Text = ""
txtnm.Text = ""
txtjr.Text = ""
txtquis.Text = ""
txtnt.Text = ""
txtuts.Text = ""
txtuas.Text = ""
txtna.Text = ""
txthm.Text = ""
End Sub


Private Sub cmdproses_Click()
Dim na As Integer
Dim hm As String
quis = Val(txtquis.Text)
tugas = Val(txtnt.Text)
uts = Val(txtuts.Text)
uas = Val(txtuas.Text)
na = (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 cmdkeluar_Click()
Unload Me
End Sub

Private Sub Form_Load()
cbonpm.AddItem "17100001"
cbonpm.AddItem "17100002"
cbonpm.AddItem "17100003"
cbonpm.AddItem "17100004"
cbonpm.AddItem "17100006"
cbonpm.AddItem "17100008"
cbonpm.AddItem "17100010"
cbonpm.AddItem "17100011"
cbonpm.AddItem "17100012"
cbonpm.AddItem "17100013"
cbonpm.AddItem "17100014"
cbonpm.AddItem "17100016"
End Sub

Tugas 2.6



Tugas 2.6


Private Sub cmdok_Click()
lbl2.Caption = txtsesuatu.Text
End Sub

Private Sub cmdselesai_Click()
End
End Sub

Private Sub opnb_Click()
lbl2.ForeColor = vbBlue
End Sub

Private Sub opnm_Click()
lbl2.ForeColor = vbRed
End Sub

Private Sub opnk_Click()
lbl2.ForeColor = vbYellow
End Sub

Private Sub opnh_Click()
lbl2.ForeColor = vbGreen
End Sub

Private Sub chkt_Click()
If chkt.Value = 1 Then
lbl2.FontBold = True
Else
lbl2.FontBold = False
End If
End Sub

Private Sub chkm_Click()
If chkm.Value = 1 Then
lbl2.FontItalic = True
Else
lbl2.FontItalic = False
End If
End Sub

Private Sub chkgb_Click()
If chkgb.Value = 1 Then
lbl2.FontUnderline = True
Else
lbl2.FontUnderline = False
End If
End Sub

Tugas 2.5



Tugas 2.5



Option Explicit
Private Sub chkud_Click()
If Chkud.Value = 1 Then
Lbltext.FontUnderline = True
Else
Lbltext.FontUnderline = False
End If
End Sub

Private Sub chkbl_Click()
If Chkbl.Value = 1 Then
Lbltext.FontBold = True
Else
Lbltext.FontBold = False
End If
End Sub

Private Sub chkso_Click()
If Chkso.Value = 1 Then
Lbltext.FontStrikethru = True
Else
Lbltext.FontStrikethru = False
End If
End Sub

Private Sub chkit_Click()
If Chkit.Value = 1 Then
Lbltext.FontItalic = True
Else
Lbltext.FontItalic = False
End If
End Sub

Private Sub opngr_Click()
Lbltext.ForeColor = vbGreen
End Sub

Private Sub opnbl_Click()
Lbltext.ForeColor = vbBlue
End Sub

Private Sub opnrd_Click()
Lbltext.ForeColor = vbRed
End Sub

Private Sub opnyl_Click()
Lbltext.ForeColor = vbYellow
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub

2.4 Aplikasi Perhitungan Gaji Menggunakan Keypress



Tugas 2.4 Aplikasi Perhitungan Gaji Menggunakan Keypress


Option Explicit

Private Sub Cmdproses_Click()
TxtGK = Val(TxtGP) + (TxtTJ) - Val(TxtPT)
TxtPJ = Val(TxtGK) * 0.1
TxtGD = Val(TxtGK) - Val(TxtPJ)
End Sub
Private Sub cmdulang_Click()
TxtGP = ""
TxtTJ = ""
TxtPT = ""
TxtGK = ""
TxtPJ = ""
TxtGD = ""
TxtGP.SetFocus
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub
Private Sub txtGP_keypress(keyascii As Integer)
If keyascii = 13 Then
TxtTJ.SetFocus
End If
End Sub

Private Sub txtTJ_keypress(keyascii As Integer)
If keyascii = 13 Then
TxtPT.SetFocus
End If
End Sub


Private Sub TxtPT_KeyPress(keyascii As Integer)
If keyascii = 13 Then
TxtGK = Val(TxtGP) + (TxtTJ) - Val(TxtPT)
TxtPJ = Val(TxtGK) * 0.1
TxtGD = Val(TxtGK) - Val(TxtPJ)
End If
End Sub

Featured Post

Tutorial

Tutorial membuat thresholding (program matlab) Thresholding  merupakan salah satu metode segmentasi citra di mana prosesnya didasa...