P1
Private Sub cmdHitung_Click()
txtdis = Val(txth) * 0.15
Txthk = Val(txth) - Val(txtdis)
End Sub
Private Sub cmdUlangi_Click()
txth = ""
txtdis = ""
Txthk = ""
txth.SetFocus
End Sub
Private Sub cmdquit_Click()
End
End Sub
P2
Private Sub txth_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txthk.SetFocus
txtdis = Val(txth) * 0.15
Txthk = Val(txth) - Val(txtdis)
End If
End Sub
Private Sub cmdUlangi_Click()
txth = ""
txtdis = ""
Txthk = ""
txth.SetFocus
End Sub
Private Sub cmdQuit_Click()
End
End Sub
P3
Private Sub cmdproses_Click()
txtgk = Val(txtgp) + Val(txtt) - Val(txtp)
txtpj = Val(txtgk) * 0.05
txtgd = Val(txtgk) - Val(txtpj)
End Sub
Private Sub cmdkeluar_Click()
End
End Sub
Private Sub cmdulang_Click()
txtgp = ""
txtt = ""
txtp = ""
txtgk = ""
txtpj = ""
txtgd = ""
txtgp.SetFocus
End Sub
P4
Private Sub cmdproses_Click()
txtgk = Val(txtgp) + Val(txtt) - Val(txtp)
txtpjk = Val(txtgk) * 0.05
txtgd = Val(txtgk) - Val(txtpj)
End Sub
Private Sub cmdkeluar_Click()
End
End Sub
Private Sub cmdulang_Click()
txtgp = ""
txtt = ""
txtp = ""
txtgk = ""
txtpk = ""
txtgd = ""
txtgp.SetFocus
End Sub
Private Sub txtgp_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtt.SetFocus
End If
End Sub
Private Sub txtp_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtgd.SetFocus
txtgk = Val(txtgp) + Val(txtt) - Val(txtp)
txtpj = Val(txtgk) * 0.05
txtgd = Val(txtgk) - Val(txtpj)
End If
End Sub
Private Sub txtt_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtp.SetFocus
End If
End Sub
P5
Private Sub Cmdext_Click()
End
End Sub
Private Sub Optred_Click()
Lbltext.ForeColor = vbRed
End Sub
Private Sub Optblue_Click()
Lbltext.ForeColor = vbBlue
End Sub
Private Sub Optgreen_Click()
Lbltext.ForeColor = vbGreen
End Sub
Private Sub Optyellow_Click()
Lbltext.ForeColor = vbYellow
End Sub
Private Sub chkbold_Click()
If Chkbold.Value = 1 Then
Lbltext.FontBold = True
Else
Lbltext.FontBold = False
End If
End Sub
Private Sub chkuderline_Click()
If Chkunderline.Value = 1 Then
Lbltext.FontUnderline = True
Else
Lbltext.FontUnderline = False
End If
End Sub
Private Sub chkstrikeout_Click()
If Chkstrikeout.Value = 1 Then
Lbltext.FontStrikethru = True
Else
Lbltext.FontStrikethru = False
End If
End Sub
Private Sub chkitalic_Click()
If Chkitalic.Value = 1 Then
Lbltext.FontItalic = True
Else
Lbltext.FontItalic = False
End If
End Sub
P6
Private Sub Cmdoke_Click()
lbltext1.Caption = txtnnm.Text
End Sub
Private Sub Cmdexit_Click()
End
End Sub
Private Sub Optblue_Click()
lbltext1.ForeColor = vbBlue
End Sub
Private Sub Optred_Click()
lbltext1.ForeColor = vbRed
End Sub
Private Sub Chkbold_Click()
lbltext1.FontBold = Chkbold.Value
End Sub
Private Sub Chkitalic_Click()
lbltext1.FontItalic = Chkitalic.Value
End Sub
P7
Private Sub Form_Load()
Cbonpm.AddItem "17600100"
Cbonpm.AddItem "17400098"
Cbonpm.AddItem "17200023"
Cbonpm.AddItem "17300021"
Cbonpm.AddItem "17100018"
End Sub
Private Sub Cbonpm_Click()
Dim nama, jurusan, HM As String
Select Case Cbonpm
Case "17600100"
nama = "ADRI"
jurusan = "Sistem Informasi"
Case "17400098"
nama = "TIKA"
jurusan = "Manajemen Informatika"
Case "17200023"
nama = "ANDRI"
jurusan = "Tehnik Sipil"
Case "17300021"
nama = "FACCY"
jurusan = "Tehnik Informatika"
Case "17100018"
nama = "MINYUN"
jurusan = "Teknik Informatika"
End Select
txtnm = nama
txtjr = jurusan
txtnq.SetFocus
End Sub
Private Sub Cmdbatal_Click()
Cbonpm.SetFocus
Cbonpm = ""
txtnm = ""
txtjr = ""
txtnq = ""
txtnt = ""
txtuts = ""
txtuas = ""
txtna = ""
txthm = ""
End Sub
Private Sub Cmdkeluar_Click()
Unload Me
End Sub
Private Sub Cmdproses_Click()
Dim NA As Integer
Dim HM As String
QUIS = Val(txtnq)
TUGAS = Val(txtnt)
UTS = Val(txtuts)
UAS = Val(txtuas)
NA = (QUIS + TUGAS + UTS + UAS) / 4
txtna.Text = NA
Select Case txtna
Case Is = 100
HM = "A"
Case Is >= 80
HM = "A"
Case Is >= 70
HM = "B"
Case Is >= 60
HM = "C"
Case Is >= 50
HM = "D"
Case Is <= 49
HM = "E"
End Select
txthm.Text = HM
End Sub
P8
Private Sub Form_Load()
Cbonpm.AddItem "17600100"
Cbonpm.AddItem "17400098"
Cbonpm.AddItem "17200023"
Cbonpm.AddItem "17300021"
Cbonpm.AddItem "17100018"
End Sub
Private Sub txtnq_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
txtuas.SetFocus
Dim NA As Integer
Dim HM As String
QUIS = Val(txtnq)
TUGAS = Val(txtnt)
UTS = Val(txtuts)
UAS = Val(txtuas)
NA = (QUIS + TUGAS + UTS + UAS) / 4
txtna.Text = NA
Select Case txtna
Case Is = 100
HM = "A"
Case Is >= 80
HM = "A"
Case Is >= 70
HM = "B"
Case Is >= 60
HM = "C"
Case Is >= 50
HM = "D"
Case Is <= 49
HM = "E"
End Select
txthm.Text = HM
End If
End Sub
Private Sub Cbonpm_Click()
Dim nama, jurusan, HM As String
Select Case Cbonpm
Case "17600100"
nama = "ADRI"
jurusan = "Sistem Informasi"
Case "17400098"
nama = "TIKA"
jurusan = "Manajemen Informatika"
Case "17200023"
nama = "ANDRI"
jurusan = "Tehnik Sipil"
Case "17300021"
nama = "FACCY"
jurusan = "Tehnik Informatika"
Case "17100018"
nama = "MINYUN"
jurusan = "Teknik Informatika"
End Select
txtnm = nama
txtjr = jurusan
txtnq.SetFocus
End Sub
Private Sub Cmdbatal_Click()
Cbonpm.SetFocus
Cbonpm = ""
txtnm = ""
txtjr = ""
txtnq = ""
txtnt = ""
txtuts = ""
txtuas = ""
txtna = ""
txthm = ""
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)
TUGAS = Val(txttugas)
UTS = Val(txtuts)
UAS = Val(txtuas)
NA = (QUIS + TUGAS + UTS + UAS) / 4
txtna.Text = NA
Select Case txtna
Case Is = 100
HM = "A"
Case Is >= 80
HM = "A"
Case Is >= 70
HM = "B"
Case Is >= 60
HM = "C"
Case Is >= 50
HM = "D"
Case Is <= 49
HM = "E"
End Select
txthm.Text = HM
End Sub
Komentar
Posting Komentar