PERTEMUAN KE-2

PROGRAM 1

1

 

SOURCE CODE

Private Sub Check1_Click()
‘membuat teks tebal
If chkBold.Value = 1 Then
lblTeks.FontBold = True
Else
lblTeks.FontBold = False
End If
End Sub

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 garis tengah
If chkStrike = 1 Then
lblTeks.FontStrikethru = True
Else
lblTeks.FontStrikethru = False
End If
End Sub

Private Sub chkUnderline_Click()
‘membuat teks garis bawah
If chkUnderline.Value = 1 Then
lblTeks.FontUnderline = True
Else
lblTeks.FontUnderline = False
End If
End Sub

Private Sub Command1_Click()
End
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

2

 

SOURCE CODE

Private Sub Command1_Click()
Label2.Caption = Text1.Text
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Option1_Click()
Label2.ForeColor = vbBlue
End Sub

Private Sub Option2_Click()
Label2.ForeColor = vbRed
End Sub

Private Sub Check1_Click()
Label2.FontBold = Check1.Value
End Sub

Private Sub Check2_Click()
Label2.FontItalic = Check2.Value
End Sub

 

PROGRAM 3

3

 

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

Select Case Cbonpm.Text
Case “15100107”
nama = “ADI KISWANTO”
jurusan = ” Manajemen Informasi”
Case “15100052”
nama = “ADITYA WIBOWO”
jurusan = “Ekonomi”
Case “15100054”
nama = “AGUNG SETIAWAN”
jurusan = “Teknik Informatika”
Case “15100056”
nama = “ALFINA DAMAYANTI”
jurusan = “Kebidanan ”
Case “15100063”
nama = “ANTI SUSANTI”
jurusan = “Kebidanan”
Case “15100081”
nama = “ANTIA”
jurusan = “Kebidanan”
Case “15100086”
nama = “BAYU SANJAYA”
jurusan = ” Guru”
Case “15100043”
nama = “BENI RISMAWAN”
jurusan = “Sistem Informasi”
Case “15100217”
nama = “CATUR PUJI PAMUNGKAS”
jurusan = “Dokter Gigi”
Case “15100053”
nama = “DAVID BUDIANTO”
jurusan = ” Manajemen Informatika”
Case “15100058”
nama = “DERU HENDRAWAN”
jurusan = “Ekonomi”
Case “15100073”
nama = “ELMA SINTIA”
jurusan = “Pramugari”
Case “15100082”
nama = “ENI SUNDARI”
jurusan = “Dokter Saraf”
Case “15100045”
nama = “GILBET ALEXANDER”
jurusan = ” Hukum”
Case “15100076”
nama = “GITA KUSUMAWARDANI”
jurusan = “Kebidanan”
Case “15100057”
nama = “HAFID BANURAHMAN”
jurusan = “Manajemen Informatika”
Case “15100044”
nama = “IRFAN NURFADULLOH”
jurusan = “Pertanian”
Case “15100067”
nama = “LAILA TURROHMAH”
jurusan = “desainer”
Case “15100066”
nama = “LELA KOMALASARI”
jurusan = “Pramugari”
Case “15100047”
nama = “M.MANDALA SAKTI”
jurusan = ” PERAWAT”
Case “15100048”
nama = “M.ZAINUL MUTAQIN”
jurusan = “Pendidikan Agama Islam”
Case “15100050”
nama = “MARIKUN”
jurusan = “Pelayaran”
Case “15100051”
nama = “MARSYANTO”
jurusan = “Penerbangan”
Case “15100074”
nama = “MUALLAMAH”
jurusan = “Model”
Case “15100062”
nama = “NABILA GHASSANI KARLUS”
jurusan = “Kebidanan”
Case “15100070”
nama = “NILA RESTIANA”
jurusan = “Model”
Case “15100071”
nama = “NITA MEY LINDA”
jurusan = “Keperawatan”
Case “15100080”
nama = “NOFIYANTI”
jurusan = “Ekonomi”
Case “15100068”
nama = “OKTA MAHENDRA”
jurusan = “Dokter Gigi”
Case “15100064”
nama = “PANCA LARASAFITRI”
jurusan = “Ekonomi”
Case “15100079”
nama = “RISKA DIANA”
jurusan = “Teknik informatika”
Case “15100061”
nama = “RISWAN EFENDI”
jurusan = “Bahasaa Asing”
Case “15100059”
nama = “RIYAN ALFARIZI”
jurusan = “MATEMATIKA”
Case “15100072”
nama = “SUSANTI”
jurusan = “Bahasa Indonesia”
Case “15100069”
nama = “TRI AYU SEPTIANA”
jurusan = “Ekonomi syariah”
Case “15100055”
nama = “VIVI NASIHATUN HIKMAH”
jurusan = “Bahasa Inggris”
Case “15100075”
nama = “WAHYUZA FRISTA DEA”
jurusan = “Kebidanan”
End Select
Textnama.Text = nama
Textjurusan.Text = jurusan
Textquis.SetFocus
End Sub

 
Private Sub Form_Load()
Cbonpm.AddItem “15100107”
Cbonpm.AddItem “15100052”
Cbonpm.AddItem “15100054”
Cbonpm.AddItem “15100056”
Cbonpm.AddItem “15100063”
Cbonpm.AddItem “15100081”
Cbonpm.AddItem “15100086”
Cbonpm.AddItem “15100043”
Cbonpm.AddItem “15100217”
Cbonpm.AddItem “15100053”
Cbonpm.AddItem “15100058”
Cbonpm.AddItem “15100073”
Cbonpm.AddItem “15100082”
Cbonpm.AddItem “15100045”
Cbonpm.AddItem “15100076”
Cbonpm.AddItem “15100057”
Cbonpm.AddItem “15100044”
Cbonpm.AddItem “15100067”
Cbonpm.AddItem “15100066”
Cbonpm.AddItem “15100047”
Cbonpm.AddItem “15100048”
Cbonpm.AddItem “15100050”
Cbonpm.AddItem “15100051”
Cbonpm.AddItem “15100074”
Cbonpm.AddItem “15100062”
Cbonpm.AddItem “15100070”
Cbonpm.AddItem “15100071”
Cbonpm.AddItem “15100080”
Cbonpm.AddItem “15100068”
Cbonpm.AddItem “15100064”
Cbonpm.AddItem “15100079”
Cbonpm.AddItem “15100061”
Cbonpm.AddItem “15100059”
Cbonpm.AddItem “15100072”
Cbonpm.AddItem “15100069”
Cbonpm.AddItem “15100055”
Cbonpm.AddItem “15100075”
End Sub

 

PROGRAM 4

4

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

Select Case Cbonpm.Text
Case “15100107”
nama = “ADI KISWANTO”
jurusan = ” Manajemen Informasi”
Case “15100052”
nama = “ADITYA WIBOWO”
jurusan = “Ekonomi”
Case “15100054”
nama = “AGUNG SETIAWAN”
jurusan = “Teknik Informatika”
Case “15100056”
nama = “ALFINA DAMAYANTI”
jurusan = “Kebidanan ”
Case “15100063”
nama = “ANTI SUSANTI”
jurusan = “Kebidanan”
Case “15100081”
nama = “ANTIA”
jurusan = “Kebidanan”
Case “15100086”
nama = “BAYU SANJAYA”
jurusan = ” Guru”
Case “15100043”
nama = “BENI RISMAWAN”
jurusan = “Sistem Informasi”
Case “15100217”
nama = “CATUR PUJI PAMUNGKAS”
jurusan = “Dokter Gigi”
Case “15100053”
nama = “DAVID BUDIANTO”
jurusan = ” Manajemen Informatika”
Case “15100058”
nama = “DERU HENDRAWAN”
jurusan = “Ekonomi”
Case “15100073”
nama = “ELMA SINTIA”
jurusan = “Pramugari”
Case “15100082”
nama = “ENI SUNDARI”
jurusan = “Dokter Saraf”
Case “15100045”
nama = “GILBET ALEXANDER”
jurusan = ” Hukum”
Case “15100076”
nama = “GITA KUSUMAWARDANI”
jurusan = “Kebidanan”
Case “15100057”
nama = “HAFID BANURAHMAN”
jurusan = “Manajemen Informatika”
Case “15100044”
nama = “IRFAN NURFADULLOH”
jurusan = “Pertanian”
Case “15100067”
nama = “LAILA TURROHMAH”
jurusan = “desainer”
Case “15100066”
nama = “LELA KOMALASARI”
jurusan = “Pramugari”
Case “15100047”
nama = “M.MANDALA SAKTI”
jurusan = ” PERAWAT”
Case “15100048”
nama = “M.ZAINUL MUTAQIN”
jurusan = “Pendidikan Agama Islam”
Case “15100050”
nama = “MARIKUN”
jurusan = “Pelayaran”
Case “15100051”
nama = “MARSYANTO”
jurusan = “Penerbangan”
Case “15100074”
nama = “MUALLAMAH”
jurusan = “Model”
Case “15100062”
nama = “NABILA GHASSANI KARLUS”
jurusan = “Kebidanan”
Case “15100070”
nama = “NILA RESTIANA”
jurusan = “Model”
Case “15100071”
nama = “NITA MEY LINDA”
jurusan = “Keperawatan”
Case “15100080”
nama = “NOFIYANTI”
jurusan = “Ekonomi”
Case “15100068”
nama = “OKTA MAHENDRA”
jurusan = “Dokter Gigi”
Case “15100064”
nama = “PANCA LARASAFITRI”
jurusan = “Ekonomi”
Case “15100079”
nama = “RISKA DIANA”
jurusan = “Teknik informatika”
Case “15100061”
nama = “RISWAN EFENDI”
jurusan = “Bahasaa Asing”
Case “15100059”
nama = “RIYAN ALFARIZI”
jurusan = “MATEMATIKA”
Case “15100072”
nama = “SUSANTI”
jurusan = “Bahasa Indonesia”
Case “15100069”
nama = “TRI AYU SEPTIANA”
jurusan = “Ekonomi syariah”
Case “15100055”
nama = “VIVI NASIHATUN HIKMAH”
jurusan = “Bahasa Inggris”
Case “15100075”
nama = “WAHYUZA FRISTA DEA”
jurusan = “Kebidanan”
End Select
Textnama.Text = nama
Textjurusan.Text = jurusan
Textquis.SetFocus
End Sub

Private Sub Cmdbatal_Click()
Cbonpm.SetFocus
Cbonpm.Text = “”
Textnama.Text = “”
Textjurusan.Text = “”
Textquis.Text = “”
Texttugas = “”
Textuts.Text = “”
Textuas.Text = “”
Textna.Text = “”
Texthm.Text = “”
End Sub

Private Sub Cmdkeluar_Click()
End
End Sub

Private Sub Cmdproses_Click()
Dim NA As Integer
Dim HM As String
QUIS = Val(Textquis.Text)
TUGAS = Val(Texttugas.Text)
UTS = Val(Textuts.Text)
UAS = Val(Textuas.Text)
NA = Val(QUIS + TUGAS + UTS + UAS) / 4
Textna.Text = NA
Select Case Textna.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
Texthm.Text = HM
End Sub

Private Sub Form_Load()
Cbonpm.AddItem “15100107”
Cbonpm.AddItem “15100052”
Cbonpm.AddItem “15100054”
Cbonpm.AddItem “15100056”
Cbonpm.AddItem “15100063”
Cbonpm.AddItem “15100081”
Cbonpm.AddItem “15100086”
Cbonpm.AddItem “15100043”
Cbonpm.AddItem “15100217”
Cbonpm.AddItem “15100053”
Cbonpm.AddItem “15100058”
Cbonpm.AddItem “15100073”
Cbonpm.AddItem “15100082”
Cbonpm.AddItem “15100045”
Cbonpm.AddItem “15100076”
Cbonpm.AddItem “15100057”
Cbonpm.AddItem “15100044”
Cbonpm.AddItem “15100067”
Cbonpm.AddItem “15100066”
Cbonpm.AddItem “15100047”
Cbonpm.AddItem “15100048”
Cbonpm.AddItem “15100050”
Cbonpm.AddItem “15100051”
Cbonpm.AddItem “15100074”
Cbonpm.AddItem “15100062”
Cbonpm.AddItem “15100070”
Cbonpm.AddItem “15100071”
Cbonpm.AddItem “15100080”
Cbonpm.AddItem “15100068”
Cbonpm.AddItem “15100064”
Cbonpm.AddItem “15100079”
Cbonpm.AddItem “15100061”
Cbonpm.AddItem “15100059”
Cbonpm.AddItem “15100072”
Cbonpm.AddItem “15100069”
Cbonpm.AddItem “15100055”
Cbonpm.AddItem “15100075”
End Sub

Private Sub Textquis_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Texttugas.SetFocus
End If
End Sub

Private Sub Texttugas_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Textuts.SetFocus
End If
End Sub

Private Sub Textuts_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Textuas.SetFocus
End If
End Sub

Iklan

click

ntaaa

Private Sub cmdproses_Click()
Text4.Text = Val(Text1) + Val(Text2) – Val(Text3)
Text5.Text = Val(Text4) * 0.1
Text6.Text = Val(Text4) – Val(Text5)
End Sub

Private Sub cmdquit_Click()
End
End Sub

Private Sub cmdulang_Click()
Text1.SetFocus
Text1 = “”
Text2 = “”
Text3 = “”
Text4 = “”
Text5 = “”
Text6 = “”
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text3.SetFocus
End If
End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text4.Text = Val(Text1) + Val(Text2) – Val(Text3)
Text5.Text = Val(Text4) * 0.1
Text6.Text = Val(Text4) – Val(Text5)
End If
End Sub

proses

ntaaa.JPG

Private Sub cmdproses_Click()
Text4.Text = Val(Text1) + Val(Text2) – Val(Text3)
Text5.Text = Val(Text4) * 0.1
Text6.Text = Val(Text4) – Val(Text5)
End Sub

Private Sub cmdquit_Click()
End
End Sub

Private Sub cmdulang_Click()
Text1.SetFocus
Text1 = “”
Text2 = “”
Text3 = “”
Text4 = “”
Text5 = “”
Text6 = “”
End Sub

Private Sub Form_Load()

End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text3.SetFocus
End If
End Sub

 

click

nt

Private Sub CMD_Click()
End
End Sub

Private Sub cmdhitung_Click()
Textdis = Val(Textha) * 0.1
Textak = Val(Textha) – Val(Textdis)
End Sub

Private Sub Cmdquit_Click()
End
End Sub

Private Sub cmdulang_Click()
Textha.SetFocus
Textha = “”
Textdis = “”
Textak = “”
End Sub

Private Sub Textha_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Textdis = Val(Textha) * 0.1
Textak = Val(Textha) – Val(Textdis)
End If

End Sub

proses

nt
Private Sub cmdhitung_Click()
Textdis = Val(Textha) * 0.1
Textak = Val(Textha) – Val(Textdis)
End Sub

Private Sub Cmdquit_Click()
End
End Sub

Private Sub cmdulang_Click()
Textha.SetFocus
Textha = “”
Textdis = “”
Textak = “”
End Sub

kalkulator

n

Private Sub Label1_Click()

End Sub

Private Sub text1_keypress(Keyascii As Integer)
If Keyascii = 13 Then
Text2.SetFocus
End If
End Sub

Private Sub Command1_Click()
Text3.Text = Val(Text1.Text) + Val(Text2.Text)
End Sub

Private Sub Command2_Click()
Text3.Text = Val(Text1.Text) * Val(Text2.Text)
End Sub

Private Sub Command3_Click()
Text3.Text = Val(Text1.Text) / Val(Text2.Text)
End Sub

Private Sub Command4_Click()
Text3.Text = Val(Text1.Text) – Val(Text2.Text)
End Sub

Private Sub Command5_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
End Sub

Private Sub Command6_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
End Sub

Private Sub Command7_Click()
End
End Sub
Private Sub text2_keypress(Keyascii As Integer)
If Keyascii = 13 Then
Text3.SetFocus
End If
End Sub

Private Sub Text3_Change()

End Sub

npm

nnn.PNG

Private Sub Command1_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
Text6.Text = “”
End Sub

Private Sub Command2_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
Text6.Text = “”
End Sub

Private Sub Command3_Click()
End
End Sub

Private Sub Form_Load()

End Sub

Private Sub Label1_Click()

End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text3.SetFocus
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text4.SetFocus
End If
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text5.SetFocus
End If
End Sub
Private Sub Text5_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text6.SetFocus
End If
End Sub