tugas 4 bahasa pemrograman

Program 1

YELI1

YEL1

Private Sub chkBold_Click()

‘Membuat teks Tebal

If chkBold.Value = 1 Then

lblTeks.FontBold = True

Else

lblTeks.FontBold = False

End If

End Sub

 

Private Sub chkItalic_Click()

‘Membuat teks Miring

If chkItalic.Value = 1 Then

lblTeks.FontItalic = True

Else

lblTeks.FontItalic = False

End If

End Sub

 

Private Sub chkStrike_Click()

‘Membuat teks Bergaristengah

If chkStrike.Value = 1 Then

lblTeks.FontStrikeout = True

Else

lblTeks.FontStrikeout = False

End If

End Sub

 

Private Sub chkUnder_Click()

‘Membuat teks Bergarisbawah

If chkUnder.Value = 1 Then

lblTeks.FontUnderline = True

Else

lblTeks.FontUnderline = False

End If

End Sub

 

Private Sub cmdexit_Click()

End

End Sub

 

Private Sub optBlue_Click()

‘Membuat teks berwarna biru

lblTeks.ForeColor = vbBlue

End Sub

 

Private Sub optGreen_Click()

‘Membuat teks berwarna hijau

lblTeks.ForeColor = vbGreen

End Sub

 

Private Sub optRed_Click()

‘Membuat teks berwarna merah

lblTeks.ForeColor = vbRed

End Sub

 

Private Sub optYellow_Click()

‘Membuat teks berwarna kuning

lblTeks.ForeColor = vbYellow

End Sub

 

Program 2

YELI0

Private Sub chkmiring_Click()

Label2.FontItalic = chkmiring.Value

End Sub

 

Private Sub chktebal_Click()

Label2.FontBold = chktebal.Value

End Sub

 

Private Sub cmdok_Click()

Label2.Caption = Text1.Text

End Sub

 

Private Sub cmdselesai_Click()

End

End Sub

 

Private Sub optbiru_Click()

Label2.ForeColor = vbBlue

End Sub

 

Private Sub optmerah_Click()

Label2.ForeColor = vbRed

End Sub

 

Program 3

YELI3

Private Sub cbonpm_Click()

Dim nama, jurusan, HM As String

 

Select Case cbonpm.Text

Case “15100201”

nama = “AFRIZA UTAMA”

jurusan = “SISTEM INFORMASI”

Case “15100120”

nama = “A.N IMAM BUCHORI”

jurusan = “SISTEM INFORMASI”

Case “15100197”

nama = “AGUNG PRAMUDI”

jurusan = “SISTEM INFORMASI”

Case “15100196”

nama = “ALI MARWAN”

jurusan = “SISTEM INFORMASI”

Case “15100140”

nama = “ANDI SUCIPTO”

jurusan = “SISTEM INFORMASI”

Case “15100125”

nama = “ANDRI AGUNG DWI SAPUTRA”

jurusan = “SISTEM INFORMASI”

Case “15100203”

nama = “ARGA PURNAMA AJI”

jurusan = “SISTEM INFORMASI”

Case “15100121”

nama = “AYU ALFANI”

jurusan = “SISTEM INFORMASI”

Case “15100135”

nama = “AYU KRISMIATI”

jurusan = “SISTEM INFORMASI”

Case “15100127”

nama = “BAYU EKA ALFIANTO”

jurusan = “SISTEM INFORMASI”

Case “15100199”

nama = “BAYU PRABOWO”

jurusan = “SISTEM INFORMASI”

Case “15201018”

nama = “DESI IRSANTI”

jurusan = “MANAJEMEN INFORMATIKA”

Case “15100122”

nama = “DIAN SAPUTRA”

jurusan = “SISTEM INFORMASI”

Case “15100130”

nama = “DIKI DIANTORO”

jurusan = “SISTEM INFORMASI”

Case “15100118”

nama = “ERLANGGA NURFERNANDO”

jurusan = “SISTEM INFORMASI”

Case “15100126”

nama = “ERMA DWIYANI”

jurusan = “SISTEM INFORMASI”

Case “15100116”

nama = “FAQIHUDDIN”

jurusan = “SISTEM INFORMASI”

Case “15100138”

nama = “FEBRI ARIYANTO”

jurusan = “SISTEM INFORMASI”

Case “15100198”

nama = “FEBRIANSYAH”

jurusan = “SISTEM INFORMASI”

Case “15100128”

nama = “HASAN HAFIDIN”

jurusan = “SISTEM INFORMASI”

Case “15100124”

nama = “ITA FIBRIYANTI”

jurusan = “SISTEM INFORMASI”

Case “15100131”

nama = “KUKUH PRASETYO”

jurusan = “SISTEM INFORMASI”

Case “15100139”

nama = “M.ARYA BIMO RIFKI”

jurusan = “SISTEM INFORMASI”

Case “15100123”

nama = “MAD MUHAIDI”

jurusan = “SISTEM INFORMASI”

Case “15100136”

nama = “MAR’ATUS SHOLEHAH”

jurusan = “SISTEM INFORMASI”

Case “15100117”

nama = “MAYMANAH”

jurusan = “SISTEM INFORMASI”

Case “15100202”

nama = “RINANDA”

jurusan = “SISTEM INFORMASI”

Case “15100133”

nama = “RISKI SAFITRA RAMADON”

jurusan = “SISTEM INFORMASI”

Case “15100195”

nama = “RULLY INDRIANTO”

jurusan = “SISTEM INFORMASI”

Case “1510032”

nama = “SELTARINA”

jurusan = “SISTEM INFORMASI”

Case “15100206”

nama = “SITI MUKODIMAH”

jurusan = “SISTEM INFORMASI”

Case “15100205”

nama = “SUPRAPTI”

jurusan = “SISTEM INFORMASI”

Case “13100457”

nama = “SUSANTO”

jurusan = “SISTEM INFORMASI”

Case “15100137”

nama = “TIARA HERMADITA”

jurusan = “SISTEM INFORMASI”

Case “15100134”

nama = “WAHYU CANDRA WIJAYA”

jurusan = “SISTEM INFORMASI”

Case “15100129”

nama = “YELI FITRI LIANUARI”

jurusan = “SISTEM INFORMASI”

Case “15100119”

nama = “YUDA FERDIANTARA”

jurusan = “SISTEM INFORMASI”

End Select

txtnama.Text = nama

txtjurusan.Text = jurusan

End Sub

 

Private Sub cmdbatal_Click()

cbonpm.SetFocus

cbonpm = “”

txtnama = “”

txtjurusan = “”

txtquis = “”

txttugas = “”

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 = NA

 

Select Case txtna

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 = HM

End Sub

 

Private Sub Form_Load()

cbonpm.AddItem “15100201”

cbonpm.AddItem “15100120”

cbonpm.AddItem “15100197”

cbonpm.AddItem “15100196”

cbonpm.AddItem “15100140”

cbonpm.AddItem “15100125”

cbonpm.AddItem “15100203”

cbonpm.AddItem “15100121”

cbonpm.AddItem “15100135”

cbonpm.AddItem “15100127”

cbonpm.AddItem “15100199”

cbonpm.AddItem “15201018”

cbonpm.AddItem “15100122”

cbonpm.AddItem “15100130”

cbonpm.AddItem “15100118”

cbonpm.AddItem “15100126”

cbonpm.AddItem “15100116”

cbonpm.AddItem “15100138”

cbonpm.AddItem “15100198”

cbonpm.AddItem “15100128”

cbonpm.AddItem “15100124”

cbonpm.AddItem “15100131”

cbonpm.AddItem “15100139”

cbonpm.AddItem “15100123”

cbonpm.AddItem “15100136”

cbonpm.AddItem “15100117”

cbonpm.AddItem “15100202”

cbonpm.AddItem “15100133”

cbonpm.AddItem “15100195”

cbonpm.AddItem “15100132”

cbonpm.AddItem “15100206”

cbonpm.AddItem “15100205”

cbonpm.AddItem “13100457”

cbonpm.AddItem “15100137”

cbonpm.AddItem “15100134”

cbonpm.AddItem “15100129”

cbonpm.AddItem “15100119”

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 txtuts_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtuas.SetFocus

End If

End Sub

 

Program 4

YELI4

Private Sub cbonpm_Click()

Dim nama, jurusan, HM As String

 

Select Case cbonpm.Text

Case “15100201”

nama = “AFRIZA UTAMA”

jurusan = “SISTEM INFORMASI”

Case “15100120”

nama = “A.N IMAM BUCHORI”

jurusan = “SISTEM INFORMASI”

Case “15100197”

nama = “AGUNG PRAMUDI”

jurusan = “SISTEM INFORMASI”

Case “15100196”

nama = “ALI MARWAN”

jurusan = “SISTEM INFORMASI”

Case “15100140”

nama = “ANDI SUCIPTO”

jurusan = “SISTEM INFORMASI”

Case “15100125”

nama = “ANDRI AGUNG DWI SAPUTRA”

jurusan = “SISTEM INFORMASI”

Case “15100203”

nama = “ARGA PURNAMA AJI”

jurusan = “SISTEM INFORMASI”

Case “15100121”

nama = “AYU ALFANI”

jurusan = “SISTEM INFORMASI”

Case “15100135”

nama = “AYU KRISMIATI”

jurusan = “SISTEM INFORMASI”

Case “15100127”

nama = “BAYU EKA ALFIANTO”

jurusan = “SISTEM INFORMASI”

Case “15100199”

nama = “BAYU PRABOWO”

jurusan = “SISTEM INFORMASI”

Case “15201018”

nama = “DESI IRSANTI”

jurusan = “MANAJEMEN INFORMATIKA”

Case “15100122”

nama = “DIAN SAPUTRA”

jurusan = “SISTEM INFORMASI”

Case “15100130”

nama = “DIKI DIANTORO”

jurusan = “SISTEM INFORMASI”

Case “15100118”

nama = “ERLANGGA NURFERNANDO”

jurusan = “SISTEM INFORMASI”

Case “15100126”

nama = “ERMA DWIYANI”

jurusan = “SISTEM INFORMASI”

Case “15100116”

nama = “FAQIHUDDIN”

jurusan = “SISTEM INFORMASI”

Case “15100138”

nama = “FEBRI ARIYANTO”

jurusan = “SISTEM INFORMASI”

Case “15100198”

nama = “FEBRIANSYAH”

jurusan = “SISTEM INFORMASI”

Case “15100128”

nama = “HASAN HAFIDIN”

jurusan = “SISTEM INFORMASI”

Case “15100124”

nama = “ITA FIBRIYANTI”

jurusan = “SISTEM INFORMASI”

Case “15100131”

nama = “KUKUH PRASETYO”

jurusan = “SISTEM INFORMASI”

Case “15100139”

nama = “M.ARYA BIMO RIFKI”

jurusan = “SISTEM INFORMASI”

Case “15100123”

nama = “MAD MUHAIDI”

jurusan = “SISTEM INFORMASI”

Case “15100136”

nama = “MAR’ATUS SHOLEHAH”

jurusan = “SISTEM INFORMASI”

Case “15100117”

nama = “MAYMANAH”

jurusan = “SISTEM INFORMASI”

Case “15100202”

nama = “RINANDA”

jurusan = “SISTEM INFORMASI”

Case “15100133”

nama = “RISKI SAFITRA RAMADON”

jurusan = “SISTEM INFORMASI”

Case “15100195”

nama = “RULLY INDRIANTO”

jurusan = “SISTEM INFORMASI”

Case “1510032”

nama = “SELTARINA”

jurusan = “SISTEM INFORMASI”

Case “15100206”

nama = “SITI MUKODIMAH”

jurusan = “SISTEM INFORMASI”

Case “15100205”

nama = “SUPRAPTI”

jurusan = “SISTEM INFORMASI”

Case “13100457”

nama = “SUSANTO”

jurusan = “SISTEM INFORMASI”

Case “15100137”

nama = “TIARA HERMADITA”

jurusan = “SISTEM INFORMASI”

Case “15100134”

nama = “WAHYU CANDRA WIJAYA”

jurusan = “SISTEM INFORMASI”

Case “15100129”

nama = “YELI FITRI LIANUARI”

jurusan = “SISTEM INFORMASI”

Case “15100119”

nama = “YUDA FERDIANTARA”

jurusan = “SISTEM INFORMASI”

End Select

txtnama.Text = nama

txtjurusan.Text = jurusan

End Sub

 

Private Sub cmdbatal_Click()

cbonpm.SetFocus

cbonpm = “”

txtnama = “”

txtjurusan = “”

txtquis = “”

txttugas = “”

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 = NA

 

Select Case txtna

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 = HM

End Sub

 

Private Sub Form_Load()

cbonpm.AddItem “15100201”

cbonpm.AddItem “15100120”

cbonpm.AddItem “15100197”

cbonpm.AddItem “15100196”

cbonpm.AddItem “15100140”

cbonpm.AddItem “15100125”

cbonpm.AddItem “15100203”

cbonpm.AddItem “15100121”

cbonpm.AddItem “15100135”

cbonpm.AddItem “15100127”

cbonpm.AddItem “15100199”

cbonpm.AddItem “15201018”

cbonpm.AddItem “15100122”

cbonpm.AddItem “15100130”

cbonpm.AddItem “15100118”

cbonpm.AddItem “15100126”

cbonpm.AddItem “15100116”

cbonpm.AddItem “15100138”

cbonpm.AddItem “15100198”

cbonpm.AddItem “15100128”

cbonpm.AddItem “15100124”

cbonpm.AddItem “15100131”

cbonpm.AddItem “15100139”

cbonpm.AddItem “15100123”

cbonpm.AddItem “15100136”

cbonpm.AddItem “15100117”

cbonpm.AddItem “15100202”

cbonpm.AddItem “15100133”

cbonpm.AddItem “15100195”

cbonpm.AddItem “15100132”

cbonpm.AddItem “15100206”

cbonpm.AddItem “15100205”

cbonpm.AddItem “13100457”

cbonpm.AddItem “15100137”

cbonpm.AddItem “15100134”

cbonpm.AddItem “15100129”

cbonpm.AddItem “15100119”

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 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)

TUGAS = Val(txttugas)

UTS = Val(txtuts)

UAS = Val(txtuas)

NA = (QUIS + TUGAS + UTS + UAS) / 4

txtna = NA

 

Select Case txtna

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 = HM

End If

End Sub

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s