Selasa, 21 November 2017

2.8 Huruf mutu mahasiswa stmik pringsewu menggunakan keypress




2.8


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 "17100033"
nama = "Robiyanto"
jurusan = "Sistem Informasi"
Case "17100032"
nama = "Dika adi pratama"
jurusan = "Sistem Informasi"
Case "17100023"
nama = "Danang pandu aji"
jurusan = "Sistem Informasi"
End Select
txtms.Text = nama
txtjn.Text = jurusan
txtqs.SetFocus
End Sub

Private Sub cmdbatal_Click()
cbonpm.SetFocus
cbonpm.Text = ""
txtms.Text = ""
txtjn.Text = ""
txtqs.Text = ""
txtnt.Text = ""
txtuts.Text = ""
txtuas.Text = ""
txtna.Text = ""
txthp.Text = ""
End Sub


Private Sub cmdproses_Click()
Dim na As Integer
Dim hp As String
quis = Val(txtqs.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
hp = "A"
Case Is > 70
hp = "B"
Case Is > 60
hp = "C"
Case Is > 50
hp = "D"
Case Is < 50
hp = "E"
End Select
txthp.Text = hp
End Sub

Private Sub cmdquit_Click()
Unload Me
End Sub

Private Sub Form_Load()
cbonpm.AddItem "17100001"
cbonpm.AddItem "17100002"
cbonpm.AddItem "17100003"
cbonpm.AddItem "17100033"
cbonpm.AddItem "17100032"
cbonpm.AddItem "17100023"
End Sub

Private Sub txtqs_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 hp As String
quis = Val(txtqs.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
hp = "A"
Case Is > 70
hp = "B"
Case Is > 60
hp = "C"
Case Is > 50
hp = "D"
Case Is < 50
hp = "E"
End Select
txthp.Text = hp
End If
End Sub

2.7 Huruf mutu mahasiswa stmik pringsewu tanpa keypress




 2.7


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 "17100033"
nama = "Robiyanto"
jurusan = "Sistem Informasi"
Case "17100032"
nama = "Dika adi pratama"
jurusan = "Sistem Informasi"
Case "17100023"
nama = "Danang pandu aji"
jurusan = "Sistem Informasi"
End Select
txtms.Text = nama
txtjn.Text = jurusan
txtqs.SetFocus
End Sub

Private Sub cmdbatal_Click()
cbonpm.SetFocus
cbonpm.Text = ""
txtms.Text = ""
txtjn.Text = ""
txtqs.Text = ""
txtnt.Text = ""
txtuts.Text = ""
txtuas.Text = ""
txtna.Text = ""
txthp.Text = ""
End Sub


Private Sub cmdproses_Click()
Dim na As Integer
Dim hp As String
quis = Val(txtqs.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
hp = "A"
Case Is > 70
hp = "B"
Case Is > 60
hp = "C"
Case Is > 50
hp = "D"
Case Is < 50
hp = "E"
End Select
txthp.Text = hp
End Sub

Private Sub cmdquit_Click()
Unload Me
End Sub

Private Sub Form_Load()
cbonpm.AddItem "17100001"
cbonpm.AddItem "17100002"
cbonpm.AddItem "17100003"
cbonpm.AddItem "17100033"
cbonpm.AddItem "17100032"
cbonpm.AddItem "17100023"
End Sub

2.6




 2.6


Private Sub cmdok_Click()
lbljawaban.Caption = txttulisan.Text
End Sub

Private Sub cmdselesai_Click()
End
End Sub

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

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

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

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

2.5 membuat font color dan font style




 2.5


Private Sub chku_Click()
If chku.Value = 1 Then
lbltext.FontUnderline = True
Else
lbltext.FontUnderline = False
End If
End Sub

Private Sub chkb_Click()
If chkb.Value = 1 Then
lbltext.FontBold = True
Else
lbltext.FontBold = False
End If
End Sub

Private Sub chks_Click()
If chks.Value = 1 Then
lbltext.FontStrikethru = True
Else
lbltext.FontStrikethru = False
End If
End Sub

Private Sub chki_Click()
If chki.Value = 1 Then
lbltext.FontItalic = True
Else
lbltext.FontItalic = False
End If
End Sub

Private Sub opnB_Click()
lbltext.ForeColor = vbBlue
End Sub

Private Sub opng_Click(Index As Integer)
lbltext.ForeColor = vbGreen
End Sub

Private Sub opnR_Click()
lbltext.ForeColor = vbRed
End Sub

Private Sub cmdquit_Click()
Unload Me
End Sub

Private Sub opny_Click(Index As Integer)
lbltext.ForeColor = vbYellow
End Sub

2.4 Aplikasi perhitungan gaji menggunakan keypress




 2.4

Private Sub CMDRESET_Click()
TXTGP = ""
TXTTN = ""
TXTPN = ""
TXTGK = ""
TXTPS = ""
TXTGD = ""
TXTGP.SetFocus
End Sub

Private Sub CMDKELUAR_Click()
Unload Me
End Sub

Private Sub TXTGP_keypress(keyascii As Integer)
If keyascii = 13 Then
TXTTN.SetFocus
End If
End Sub

Private Sub TXTTN_keypress(keyascii As Integer)
If keyascii = 13 Then
TXTPN.SetFocus
End If
End Sub

Private Sub TXTPN_keypress(keyascii As Integer)
If keyascii = 13 Then
TXTGK = Val(TXTGP) + Val(TXTTN) - Val(TXTPN)
TXTPS = Val(TXTGK) * 0.1
TXTGD = Val(TXTGK) - Val(TXTPS)
End If
End Sub

Tutorial

TUTORIAL THRESHOLDING CITRA DIGITAL (PROGRAM MATLAB) Thresholding merupakan salah satu metode segmentasi citra dimana prosesnya did...