program 4

PROGRAM 4

Private Sub Cbogolongan_Click()

Dim gapok, tunjangan, pajak, total As Variant

Select Case Cbogolongan.Text

Case “I”

gapok = 1000000

tunjangan = 500000

Case “II”

gapok = 2000000

tunjangan = 700000

Case “III”

gapok = 3000000

tunjangan = 800000

Case “IV”

gapok = 4000000

tunjangan = 1000000

Case Else

gapok = 0

tunjangan = 0

End Select

total = gapok + tunjangan

pajak = total * 0.1

Txtgapok.Text = gapok

Txttunjangan.Text = tunjangan

Txtpajak.Text = pajak

Txttotal.Text = total – pajak

End Sub

Private Sub Command1_Click()

Txtnidn.SetFocus

Txtnidn.Text = “”

Txtnama.Text = “”

Cbogolongan.Text = “”

Txtgapok.Text = “”

Txttunjangan.Text = “”

Txtpajak.Text = “”

Txttotal.Text = “”

End Sub

Private Sub Command2_Click()

Txtnidn.SetFocus

Txtnidn.Text = “”

Txtnama.Text = “”

Cbogolongan.Text = “”

Txtgapok.Text = “”

Txttunjangan.Text = “”

Txtpajak.Text = “”

Txttotal.Text = “”

End Sub

Private Sub Command3_Click()

Unload Me

End Sub

Private Sub Form_Load()

Cbogolongan.AddItem “I”

Cbogolongan.AddItem “II”

Cbogolongan.AddItem “III”

Cbogolongan.AddItem “IV”

End Sub

Private Sub Txtnidn_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtnama.SetFocus

End If

End Sub

Iklan

program 3

PROGRAM3_ENTER

program enter

Private Sub Cbonpm_Click()

Dim nama, jurusan, HM As String

Select Case Cbonpm.Text

Case “14100204”

nama = “BAMBANG ARYO PAMUNGKAS”

jurusan = “Sistem Informasi”

Case “14100166”

nama = “DEVI YUNITA”

jurusan = “Sistem Informasi”

Case “14100212”

nama = “DWI PRAYOGO”

jurusan = “Sistem Informasi”

Case “14100177”

nama = “JAMILAH”

jurusan = “Sistem Informasi”

Case “14100189”

nama = “MAIMUNAH”

jurusan = “Sistem Informasi”

Case “14100247”

nama = “RATNASARI”

jurusan = “Sistem Informasi”

Case “14100217”

nama = “SUAMAH”

jurusan = “Sistem Informasi”

Case “14100172”

nama = “ARMINSYAH”

jurusan = “Sistem Informasi”

Case “14100198”

nama = “SITI NUR BAITI”

jurusan = “Sistem Informasi”

Case “14100210”

nama = “FERANITA PRADHANNY”

jurusan = “Sistem Informasi”

End Select

Txtnama.Text = nama

Txtjurusan.Text = jurusan

Txtquis.SetFocus

End Sub

Private Sub cmdbatal_Click()

Cbonpm.SetFocus

Cbonpm.Text = “”

Txtnama.Text = “”

Txtjurusan.Text = “”

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

TUGAS = Val(Txttugas.Text)

UTS = Val(Txtuts.Text)

UAS = (Txtuas.Text)

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

Txtna = 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 Form_Load()

Cbonpm.AddItem “14100204”

Cbonpm.AddItem “14100166”

Cbonpm.AddItem “14100212”

Cbonpm.AddItem “14100177”

Cbonpm.AddItem “14100189”

Cbonpm.AddItem “14100247”

Cbonpm.AddItem “14100217”

Cbonpm.AddItem “14100172”

Cbonpm.AddItem “14100198”

Cbonpm.AddItem “14100210”

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

If KeyAscii = 13 Then

Dim NA As Integer

Dim HM As String

QUIS = Val(Txtquis.Text)

TUGAS = Val(Txttugas.Text)

UTS = Val(Txtuts.Text)

UAS = (Txtuas.Text)

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

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

Private Sub Txtuts_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtuas.SetFocus

End If

End Sub

PROGRAM3_PROSES

program proses

Private Sub Cbonpm_Click()

Dim nama, jurusan, HM As String

Select Case Cbonpm.Text

Case “14100204”

nama = “BAMBANG ARYO PAMUNGKAS”

jurusan = “Sistem Informasi”

Case “14100166”

nama = “DEVI YUNITA”

jurusan = “Sistem Informasi”

Case “14100212”

nama = “DWI PRAYOGO”

jurusan = “Sistem Informasi”

Case “14100177”

nama = “JAMILAH”

jurusan = “Sistem Informasi”

Case “14100189”

nama = “MAIMUNAH”

jurusan = “Sistem Informasi”

Case “14100247”

nama = “RATNASARI”

jurusan = “Sistem Informasi”

Case “14100217”

nama = “SUAMAH”

jurusan = “Sistem Informasi”

Case “14100172”

nama = “ARMINSYAH”

jurusan = “Sistem Informasi”

Case “14100198”

nama = “SITI NUR BAITI”

jurusan = “Sistem Informasi”

Case “14100210”

nama = “FERANITA PRADHANNY”

jurusan = “Sistem Informasi”

End Select

Txtnama.Text = nama

Txtjurusan.Text = jurusan

Txtquis.SetFocus

End Sub

Private Sub cmdbatal_Click()

Cbonpm.SetFocus

Cbonpm.Text = “”

Txtnama.Text = “”

Txtjurusan.Text = “”

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

TUGAS = Val(Txttugas.Text)

UTS = Val(Txtuts.Text)

UAS = (Txtuas.Text)

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

Txtna = 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 Form_Load()

Cbonpm.AddItem “14100204”

Cbonpm.AddItem “14100166”

Cbonpm.AddItem “14100212”

Cbonpm.AddItem “14100177”

Cbonpm.AddItem “14100189”

Cbonpm.AddItem “14100247”

Cbonpm.AddItem “14100217”

Cbonpm.AddItem “14100172”

Cbonpm.AddItem “14100198”

Cbonpm.AddItem “14100210”

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 2

PROGRAM 2

Private Sub chkBold_Click()

Label2.FontBold = chkBold.Value

End Sub

Private Sub chkItalic_Click()

Label2.FontItalic = chkItalic.Value

End Sub

Private Sub chkStrike_Click()

Label2.FontStrikethru = chkStrike.Value

End Sub

Private Sub chkUnder_Click()

Label2.FontUnderline = chkUnder.Value

End Sub

Private Sub Command1_Click()

Label2.Caption = Text1.Text

End Sub

Private Sub Command2_Click()

End

End Sub

Private Sub optblue_Click()

Label2.ForeColor = vbBlue

End Sub

Private Sub optgreen_Click()

Label2.ForeColor = vbGreen

End Sub

Private Sub optred_Click()

Label2.ForeColor = vbRed

End Sub

Private Sub optyellow_Click()

Label2.ForeColor = vbYellow

End Sub

program 1

PROGRAM 1

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 bergaris tengah

If chkStrike.Value = 1 Then

lblTeks.FontStrikethru = True

Else

lblTeks.FontStrikethru = False

End If

End Sub

Private Sub chkUnder_Click()

‘membuat teks bergaris bawah

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