tugas 4

Gambar
Private Sub cmdbatal_Click()
txtkb.SetFocus
txtkb.Text = “”
txtjb.Text = “”
txtpeng.Text = “”
txttt.Text = “”
txtpen.Text = “”
txthrg.Text = “”
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub cmdlagi_Click()
txtkb.SetFocus
txtkb.Text = “”
txtjb.Text = “”
txtpeng.Text = “”
txttt.Text = “”
txtpen.Text = “”
txthrg.Text = “”
End Sub

Private Sub cmdproses_Click()
Dim s As String

s = Mid(txtkb.Text, 8, 1)
If s = “A” Then
txtpen.Text = “Andi Offset Yogyakarta”
ElseIf s = “I” Then
txtpen.Text = “Indah Surabaya”
ElseIf s = “S” Then
txtpen.Text = “Salemba Empat”
ElseIf s = “E” Then
txtpen.Text = “Elek Media Koputindo”
ElseIf s = “M” Then
txtpen.Text = “Maxicom”
End If

s = Mid(txtkb.Text, 1, 3)
If s = “SIM” Then
txtjb.Text = “Sistem Informasi Manajemen”
txtpeng.Text = “Fadiyah Ulfa”
txthrg.Text = “75900″

ElseIf s = “EDP” Then
txtjb.Text = “Elektronik Data Procissing”
txtpeng.Text = “Nurul Agustina”
txthrg.Text = “62000″

ElseIf s = “MNJ” Then
txtjb.Text = “Manajemen”
txtpeng.Text = “Rian Hidayat”
txthrg.Text = “42000″

ElseIf s = “CDR” Then
txtjb.Text = “Corel Draw”
txtpeng.Text = “Siti Nur Khotimah”
txthrg.Text = “62000″

ElseIf s = “RPL” Then
txtjb.Text = “Rekayasa Prangkat Lunak”
txtpeng.Text = “Winda Erlianti”
txthrg.Text = “83000″
End If
txttt.Text = “20″ & Mid(txtkb.Text, 5, 2)
End Sub

Advertisements
By gholibmuhajir

perhitungan diskon


5.MD perhitungan diskon

Source Kode :

Private Sub Combo1_Click()
Combo1.AddItem “ABA”
Combo1.AddItem “AMIK”
Combo1.AddItem “AKA”
End Sub

Private Sub Combo2_Click()
If Combo2 = “MI-0101-KTI” Then
Text4.Text = “Konsep Teknologi Informasi”
Text5.Text = “4″
Text6.Text = “20000″
Text6.SetFocus
Else
End If

If Combo2 = “MI-0102-PA” Then
Text4.Text = “Penghantar Akutansi”
Text5.Text = “4″
Text6.Text = “25000″
Text6.SetFocus
Else
End If

If Combo2 = “MI-0103-LA” Then
Text4.Text = “Logika ALgoritma”
Text5.Text = “3″
Text6.Text = “30000″
Text6.SetFocus
Else
End If

If Combo2 = “MI-0104-MD” Then
Text4.Text = “Matematika Dasar”
Text5.Text = “2″
Text6.Text = “15000″
Text6.SetFocus
Else
End If

If Combo2 = “BA-0101-LS” Then
Text4.Text = “Listening”
Text5.Text = “4″
Text6.Text = “25000″
Text6.SetFocus
Else
End If

If Combo2 = “BA-0101-SP” Then
Text4.Text = “speaking”
Text5.Text = “3″
Text6.Text = “40000″
Text6.SetFocus
Else
End If

If Combo2 = “BA-0101-CV” Then
Text4.Text = “Conversation”
Text5.Text = “2″
Text6.Text = “35000″
Text6.SetFocus
Else
End If
End Sub

Private Sub Command1_Click()
Text9.Text = Val(Text7.Text) – Val(Text8.Text)
End Sub

Private Sub Form_Load()
Combo1.AddItem “ABA”
Combo1.AddItem “AMIK”
Combo1.AddItem “AKA”
Combo2.AddItem “MI-0101-KTI”
Combo2.AddItem “MI-0102-PA”
Combo2.AddItem “MI-0103-LA”
Combo2.AddItem “MI-0104-MD”
Combo2.AddItem “BA-0101-LS”
Combo2.AddItem “BA-0101-SP”
Combo2.AddItem “BA-0101-CV”
End Sub

Private Sub Option1_Click()
Text8.Text = Val(Text7.Text) * 0.5
End Sub

Private Sub Option2_Click()
Text8.Text = Val(Text7.Text) * 0.1
End Sub

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

By gholibmuhajir

gaji pegawai

9

Private Sub cbogol_Click()

Dim a, b, c, d As Variant

Select Case cbogol.Text

Case “I”

a = “1500000″

b = “250000″

Case “II”

a = “2000000″

b = “500000″

Case “III”

a = “2500000″

b = “750000″

Case “IV”

a = “3000000″

b = “1000000″

End Select

c = (Val(a) + Val(b)) * 0.1

d = Val(a) + Val(b) – Val(c)

txtpokok.Text = a

txttunjangan.Text = b

txtpajak.Text = c

txttotal.Text = d

End Sub

By gholibmuhajir

huruf mutu mahasiswa

6

 Private Sub Form_Load()
 Combo1.AddItem "12100515"
 Combo1.AddItem "12100525"
 Combo1.AddItem "12100535"
 Combo1.AddItem "12100545"
 Combo1.AddItem "12100555"
 Combo1.AddItem "12100565"
 Combo1.AddItem "12100575"
 Combo1.AddItem "12100585"
 Combo1.AddItem "12100595"
 Combo1.AddItem "12100666"
 End Sub

 Private Sub Combo1_Click()
 If Combo1 = "12100515" Then
 txtNama.Text = "Marchoni"
 txtjurusan.Text = "Sistem Informasi"
 txtQuis.SetFocus
 Else
 End If

 If Combo1 = "12100525" Then
 txtNama.Text = "Siti Kholijah"
 txtjurusan.Text = "Sistem Informasi"
 txtQuis.SetFocus
 Else
 End If
 If Combo1 = "12100535" Then
 txtNama.Text = "Adi Setiawan"
 txtjurusan.Text = "Sistem Informasi"
 txtQuis.SetFocus
 Else
 End If
 If Combo1 = "12100545" Then
 txtNama.Text = "Barnes Setiawan"
 txtjurusan.Text = "Manajemen Informatika"
 txtQuis.SetFocus
 Else
 End If
 If Combo1 = "12100555" Then
 txtNama.Text = "Adhy Pangestu"
 txtjurusan.Text = "Manajemen Informatika"
 txtQuis.SetFocus
 Else
 End If
 If Combo1 = "12100565" Then
 txtNama.Text = "Setiawan Adi"
 txtjurusan.Text = "Design Grafis"
 txtQuis.SetFocus
 Else
 End If
 If Combo1 = "12100575" Then
 txtNama.Text = "Sunardi"
 txtjurusan.Text = "Manajemen Informatika"
 txtQuis.SetFocus
 Else
 End If
 If Combo1 = "12100585" Then
 txtNama.Text = "Arif Lukman"
 txtjurusan.Text = "Manajemen Informatika"
 txtQuis.SetFocus
 Else
 End If
 If Combo1 = "12100595" Then
 txtNama.Text = "Alivia"
 txtjurusan.Text = "Sistem Informasi"
 txtQuis.SetFocus
 Else
 End If
 If Combo1 = "12100666" Then
 txtNama.Text = "Adi Barnes Setiawan"
 txtjurusan.Text = "Design Grafis"
 txtQuis.SetFocus
 Else
 End If
 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
 txtNA.Text = (Val(txtQuis.Text) + Val(txtTugas.Text) + Val(txtUts.Text) + Val(txtUas.Text)) / 4
 If Val(txtNA.Text) <= 50 Then txtHuruf.Text = "E"
 If Val(txtNA.Text) >= 50 Then txtHuruf.Text = "D"
 If Val(txtNA.Text) >= 60 Then txtHuruf.Text = "C"
 If Val(txtNA.Text) >= 70 Then txtHuruf.Text = "B"
 If Val(txtNA.Text) >= 80 Then txtHuruf.Text = "A"
 End If
 End Sub

 Private Sub txtUts_KeyPress(KeyAscii As Integer)
 If KeyAscii = 13 Then
 txtUas.SetFocus
 End If
 End Sub

 Private Sub cmdProses_Click()
 txtNA.Text = (Val(txtQuis.Text) + Val(txtTugas.Text) + Val(txtUts.Text) + Val(txtUas.Text)) / 4
 If Val(txtNA.Text) <= 50 Then txtHuruf.Text = "E"
 If Val(txtNA.Text) >= 50 Then txtHuruf.Text = "D"
 If Val(txtNA.Text) >= 60 Then txtHuruf.Text = "C"
 If Val(txtNA.Text) >= 70 Then txtHuruf.Text = "B"
 If Val(txtNA.Text) >= 80 Then txtHuruf.Text = "A"
 End Sub

 Private Sub cmdBatal_Click()
 txtNama.Text = ""
 txtjurusan.Text = ""
 txtQuis.Text = ""
 txtTugas.Text = ""
 txtUts.Text = ""
 txtUas.Text = ""
 txtNA.Text = ""
 txtHuruf.Text = ""
 txtNama.SetFocus
 End Sub

 Private Sub cmdKeluar_Click()
 End
 End Sub
By gholibmuhajir

aplikasi perhitungan gaji

4

 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.Text) + Val(Text2.Text) - Val(Text3.Text)
 Text5.Text = Val(Text4.Text) * 0.2
 Text6.Text = Val(Text4.Text) - Val(Text5.Text)
 End If
 End Sub

 Private Sub Command1_Click()
 Text4.Text = Val(Text1.Text) + Val(Text2.Text) - Val(Text3.Text)
 Text5.Text = Val(Text4.Text) * 0.2
 Text6.Text = Val(Text4.Text) - Val(Text5.Text)
 End Sub

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

 Private Sub Command3_Click()
 End
 End Sub
By gholibmuhajir

warna dan font

Capture

Private Sub optRed_Click()
'membuat teks berwarna merah
lblTeks.ForeColor = vbRed
End Sub

Private Sub optGreen_Click()
'membuat teks berwarna Hijau
lblTeks.ForeColor = vbGreen
End Sub

Private Sub optBlue_Click()
'membuat teks berwarna biru
lblTeks.ForeColor = vbBlue
End Sub

Private Sub optYellow_Click()
'membuat teks berwarna Kuning
lblTeks.ForeColor = vbYellow
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 chkUnder_Click()
'membuat teks bergaris bawah
If chkUnder.Value = 1 Then
    lblTeks.FontUnderline = True
Else
    lblTeks.FontUnderline = 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 cmdExit_Click()
End
End Sub
By gholibmuhajir

data mahasiswa

Data Mahasiswa

Source Kode :

Private Sub Command1_Click()
Dim S As String
Text5.Text = “20″ & Left(Text2.Text, 2)
S = Mid(Text2.Text, 3, 1)
If S = “1″ Then
Text3.Text = “Sistem Informasi”
ElseIf S = “2″ Then
Text3.Text = “Manajemen Informatika”
ElseIf S = “3″ Then
Text3.Text = “Tehnik Informatika”
ElseIf S = “4″ Then
Text3.Text = “Manajemen & Komp. Akuntansi”
End If
S = Mid(Text2.Text, 4, 2)
If S = “01″ Then
Text4.Text = “Strata Satu”
ElseIf S = “02″ Then
Text4.Text = “Diploma Tiga”
ElseIf S = “03″ Then
Text4.Text = “Diploma Empat”
ElseIf S = “04″ Then
Text4.Text = “Diploma Dua”
End If
Text6.Text = Right(Text2.Text, 3)
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()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
Text6.Text = “”
End Sub

Private Sub Command4_Click()
End
End Sub

Private Sub Text1_KEYPRESS(KEYASCII As Integer)
If KEYASCII = 13 Then
Text2.SetFocus
End If
End Sub

By gholibmuhajir

Properti tes

Properti test

Source Kode :

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

By gholibmuhajir

tugas 2 visual basic

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.Text = Val(Text1.Text) + Val(Text2.Text)
Text4.Text = Val(Text1.Text) * Val(Text2.Text)
Text5.Text = Val(Text1.Text) / Val(Text2.Text)
Text6.Text = Val(Text1.Text) – Val(Text2.Text)
End If
End Sub
Private Sub Command1_Click()
Text3.Text = Val(Text1.Text) + Val(Text2.Text)
Text4.Text = Val(Text1.Text) * Val(Text2.Text)
Text5.Text = Val(Text1.Text) / Val(Text2.Text)
Text6.Text = Val(Text1.Text) – Val(Text2.Text)
End Sub
Private Sub Command2_Click()
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
Text6.Text = “”
Text1.SetFocus
End Sub
Private Sub Command3_Click()
End
End Sub
By gholibmuhajir

berita komputer

Getting Time…
headline

Smartfren Bagi-bagi Smartphone Android Gratis, Mau?

PT. Smartfren Telecom hari ini, Sabtu (9/2/2013) baru saja membuat gebrakan dengan menggelar program bagi-bagi android gratis di mal.
headline

Heboh Penemuan Cumi-Cumi Terbang

Hewan ini meluncur dari laut ke udara di kecepatan tinggi untuk menghindari predator.
TECHNOCRATS »

Profil Wildan, Si Peretas Situs SBY

oleh Amril Amarullah (Okezone)

Lulus pada 2010, ia langsung tenar berkat mengalihkan DNS situs SBY. Pihak sekolah pun kaget dengan peristiwa itu.
PILIHAN REDAKSI »

Gempa 8.0 SR Tak Timbulkan Tsunami Besar, Mengapa?

Rabu, 06 02 2013 – 15:58 wib

Peneliti mengatakan, kedalaman titik gempa di laut bisa mempengaruhi kekuatan tsunami.
technocrats

GBG, Kelompok Belajar Ekonomi Digital
Google Business Group (GBG) adalah komunitas bisnis bergerak untuk memasyarakatkan penggunaan teknologi internet.
wired

Demi Rp1,9 Juta, Gadis Ini Tinggalkan Facebook 5 Bulan
Gadis berusia 14 tahun ini menandatangani “Facebook Deactivation Agreement” dengan Ayahnya, Paul Baier.
tips

9 Cara Aman Gunakan WiFi Publik
Saat ini jumlah titik Wi-Fi gratis tumbuh dengan pesat. Akan tetapi, tidak setiap WiFi mampu memberikan perlindungan jaringan seperti rumah pribadi.
bookmark

Yuk.. Cari Referensi Destinasi Liburan di Wikivoyage!
Melalui situs ini, para pelancong memperoleh dan dapat memberikan informasi wisata ke orang lain.
bookmark

Tinggalkan Dunia Hiburan, Christian Sugiono Serius Kelola Startup?
Situs yang menyediakan konten humor itu kini menjadi cukup populer bagi peselancar di jagad maya.

VIDEO »

Berlatih dengan Personal Trainer via Smartphone

Anda ingin bimbingan dari personal trainer, tapi enggan merogoh kocek untuk biaya per jamnya yang cukup mahal? Liputan berikut dari reporter VOA Ade Astuti akan mengenalkan Anda pada pelatih-pelatih pribadi yang hadir dalam bentuk aplikasi di ponsel pintar Anda.

140

Bekerjalah yang terbaik karena engkau tidak akan selamanya di sana. Dan ketika kau tak lagi di sana, kau ingin namamu ada – @st_agustaf (Steny Agustaf, Penyiar)

 
By gholibmuhajir