Aside

font color & font style

font color

FONT HIJAU FONT KUNING FONT MERAH

Private Sub Chkbold_Click()
If Chkbold.Value = 1 Then
lblteks.FontBold = True
Else
lblteks.FontBold = False
End If
End Sub

Private Sub Chkitalic_Click()
If Chkitalic.Value = 1 Then
lblteks.FontItalic = True
Else
lblteks.FontItalic = False
End If
End Sub

Private Sub Chkstrike_Click()
If Chkstrike.Value = 1 Then
lblteks.FontStrikethru = True
Else
lblteks.FontStrikethru = False
End If
End Sub

Private Sub Chkunder_Click()
If Chkstrike.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()
lblteks.ForeColor = vbBlue
End Sub

Private Sub optgreen_Click()
lblteks.ForeColor = vbGreen
End Sub

Private Sub optred_Click()
lblteks.ForeColor = vbRed
End Sub

Private Sub optyellow_Click()
lblteks.ForeColor = vbYellow
End Sub

HURUF MUTU MAHASISWA STMIK PRINGSEWU

HURUF MUTU

Private Sub cmdbatal_Click()
cbonpm.SetFocus
cbonpm.Text = “”
txtnama.Text = “”
Txtjurusan.Text = “”
txtquis.Text = “”
Txttugas.Text = “”
txtuts.Text = “”
txtuas.Text = “”
Txtna.Text = “”
txthm.Text = “”
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 = Val(txtuas.Text)
na = (quis + tugas + uts + uas) / 4
Txtna.Text = 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 Cmdkeluar_Click()
End
End Sub

Private Sub form_load()
cbonpm.AddItem “12100329″
cbonpm.AddItem “12100330″
cbonpm.AddItem “12100331″
cbonpm.AddItem “12100336″
cbonpm.AddItem “12100335″
cbonpm.AddItem “12201100″
End Sub

Private Sub cbonpm_click()
Select Case cbonpm.Text
Case “12100329″
nama = “CITA DENI ARTIKA”
jurusan = “Sistem Informasi”
Case “12100330″
nama = “SEKTI RESMI ASIH”
jurusan = “Sistem Informasi”
Case “12100331″
nama = “RITA RAHAYU”
jurusan = “Sistem Informasi”
Case “12100336″
nama = “YAYUK ARINI”
jurusan = “Sistem Informasi”
Case “12100335″
nama = “SITI FATONAH”
jurusan = “Sistem Informasi”
Case “12201101″
nama = “SITI NURHAYATI”
jurusan = “Sistem Informasi”
End Select
txtnama.Text = nama
Txtjurusan.Text = jurusan
txtquis.SetFocus
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

NIDN CITA DENTI ARTIKA

CITA

Private Sub Cbogolongan_click()
Dim gapok, pajak, tunjangan, total As Variant
Select Case Cbogolongan.Text
Case “I”
gapok = 1500000
tunjangan = 150000
Case “II”
gapok = 2000000
tunjangan = 200000
Case “III”
gapok = 2500000
tunjangan = 250000
Case “IV”
gapok = 3000000
tunjangan = 300000
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

Public Sub kosong()
txtnidn.SetFocus
txtnidn.Text = “”
txtnama.Text = “”
Cbogolongan.Text = “”
txtpajak.Text = “”
txtgapok.Text = “”
txttunjangan.Text = “”
txttotal.Text = “”
End Sub

Private Sub cmdbatal_Click()
kosong
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
kosong
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

Property test

PROPERTY BIRU PROPERTY MERAH

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

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

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

TUGAS VISUAL BASIC

By citadentiartika

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s