Tugas Visual Basic #1 Tugas Ke 3

Awalan PostinganAssalamu’alaikum Wr. Wb..

Artikel ini dibuat guna untuk memenuhi tugas
Mata Kuliah Visual Basic#1 Pertemuan ke 3

Membuat10 Program Sederhana Menggunakn Visual Basic.🙂

Langsung aja iia nie dia.. Woles pak Dosen..😀

  • Nama : ADI SETIAWAN

  • NPM : 12100535
  • Kelas Twitter 12
  • MK : Visual Basic#1

1. Aplikasi Perhitungan Gaji

Aplikasi Perhitungan Gaji
Untuk Project & Form Bisa Download via 4shared => DISINI

Nah untuk Source Codenya Simak dibawah ini :

 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

2.Font Color & Style

Font & Color Style
Untuk Project & Form bisa download via 4shared DISINI

Nah untuk Source Codenya Simak dibawah ini :

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

3.Gaji karyawan “PT SETIAWAN”

Gaji Karyawan ADI SETIAWAN
Untuk Project & Form bisa download via 4shared DISINI

Nah untuk Source Codenya Simak dibawah ini :

 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.Text = Val(Text3.Text) + Val(Text4.Text) + Val(Text4.Text)
 Text7.SetFocus
 End If
 End Sub

 Private Sub Text7_KeyPress(KeyAscii As Integer)
 If KeyAscii = 13 Then
 Text8.Text = Val(Text6.Text) * Val(Text7.Text) / 100
 Text8.SetFocus
 End If
 End Sub

 Private Sub Command1_Click()
 Text9.Text = Val(Text6.Text) - Val(Text8.Text)
 End Sub

4.Perhitungan Diskon
Perhitungan DiskonUntuk Project & Form bisa download via 4shared DISINI

Nah untuk Source Codenya Simak dibawah ini :

 If KeyAscii = 13 Then
 Adi2.SetFocus
 End If
 End Sub

 Private Sub Adi2_KeyPress(KeyAscii As Integer)
 If KeyAscii = 13 Then
 Adi3.SetFocus
 End If
 End Sub

 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
 Adi4.Text = "Konsep Teknologi Informasi"
 Adi5.Text = "4"
 Adi6.Text = "20000"
 Adi6.SetFocus
 Else
 End If

 If Combo2 = "MI-0102-PA" Then
 Adi4.Text = "Penghantar Akutansi"
 Adi5.Text = "4"
 Adi6.Text = "25000"
 Adi6.SetFocus
 Else
 End If

 If Combo2 = "MI-0103-LA" Then
 Adi4.Text = "Logika ALgoritma"
 Adi5.Text = "3"
 Adi6.Text = "30000"
 Adi6.SetFocus
 Else
 End If

 If Combo2 = "MI-0104-MD" Then
 Adi4.Text = "Matematika Dasar"
 Adi5.Text = "2"
 Adi6.Text = "15000"
 Adi6.SetFocus
 Else
 End If

 If Combo2 = "BA-0101-LS" Then
 Adi4.Text = "Listening"
 Adi5.Text = "4"
 Adi6.Text = "25000"
 Adi6.SetFocus
 Else
 End If

 If Combo2 = "BA-0101-SP" Then
 Adi4.Text = "speaking"
 Adi5.Text = "3"
 Adi6.Text = "40000"
 Adi6.SetFocus
 Else
 End If

 If Combo2 = "BA-0101-CV" Then
 Adi4.Text = "Conversation"
 Adi5.Text = "2"
 Adi6.Text = "35000"
 Adi6.SetFocus
 Else
 End If
 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 Adi6_KeyPress(KeyAscii As Integer)
 If KeyAscii = 13 Then
 Adi7.Text = Val(Adi5.Text) * Val(Adi6.Text)
 Adi8.SetFocus
 End If
 End Sub

 Private Sub Option1_Click()
 Adi8.Text = Val(Adi7.Text) * 0.5
 End Sub

 Private Sub Option2_Click()
 Adi8.Text = Val(Adi7.Text) * 0.1
 End Sub

 Private Sub Command1_Click()
 Adi9.Text = Val(Adi7.Text) - Val(Adi8.Text)
 End Sub

5.Golongan Gaji “PT Setiawan”
Golongan Gaji

Untuk Project & Form bisa download via 4shared DISINI

Nah untuk Source Codenya Simak dibawah ini :

Private Sub Form_Load()
Combo1.AddItem "I"
Combo1.AddItem "II"
Combo1.AddItem "III"
Combo1.AddItem "IV"
End Sub

Private Sub Adi1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Adi2.SetFocus
End If
End Sub

Private Sub Combo1_Click()
If Combo1 = "I" Then
Adi3.Text = "1500000"
Adi4.Text = "150000"
Adi5.Text = (Val(Adi3.Text) + Val(Adi4.Text)) * 0.1
Adi6.Text = (Val(Adi3.Text) + Val(Adi4.Text) - Val(Adi5.Text))
Adi6.SetFocus
Else
End If

If Combo1 = "II" Then
Adi3.Text = "2000000"
Adi4.Text = "200000"
Adi5.Text = (Val(Adi3.Text) + Val(Adi4.Text)) * 0.1
Adi6.Text = (Val(Adi3.Text) + Val(Adi4.Text) - Val(Adi5.Text))
Adi6.SetFocus
Else
End If

If Combo1 = "III" Then
Adi3.Text = "2500000"
Adi4.Text = "250000"
Adi5.Text = (Val(Adi3.Text) + Val(Adi4.Text)) * 0.1
Adi6.Text = (Val(Adi3.Text) + Val(Adi4.Text) - Val(Adi5.Text))
Adi6.SetFocus
Else
End If

If Combo1 = "IV" Then
Adi3.Text = "3000000"
Adi4.Text = "300000"
Adi5.Text = (Val(Adi3.Text) + Val(Adi4.Text)) * 0.1
Adi6.Text = (Val(Adi3.Text) + Val(Adi4.Text) - Val(Adi5.Text))
Adi6.SetFocus
Else
End If
End Sub

Private Sub Command1_Click()
Adi1.Text = ""
Adi2.Text = ""
Adi3.Text = ""
Adi4.Text = ""
Adi5.Text = ""
Adi6.Text = ""
Combo1 = ""
Adi1.SetFocus
End Sub

Private Sub Command2_Click()
Adi1.Text = ""
Adi2.Text = ""
Adi3.Text = ""
Adi4.Text = ""
Adi5.Text = ""
Adi6.Text = ""
Combo1 = ""
Adi1.SetFocus
End Sub

Private Sub Command3_Click()
End
End Sub


6.Properti Test

Properti Test

Project & Form tetep bisa di download hehe via 4shared DISINI

Nah untuk Source Codenya Simak baik2 yah dibawah ini :

 Private Sub Text1_KeyPress(KeyAscii As Integer)
 If KeyAscii = 13 Then
 Label2.Caption = Text1.Text
 End If
 End Sub

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

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

 Private Sub Option3_Click()
 Label2.ForeColor = vbGreen
 End Sub

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

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

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

 Private Sub Command2_Click()
 End
 End Sub

7.Data Penumpang KA

KA ADI SETIAWANTenang tenang..!! Project & Form tetep bisa di download kok haha via 4shared DISINI

Nah untuk Source Codenya Simak baik2 yah dibawah ini :

 Private Sub Check1_Click()
 Text8.Text = (Val(Text7.Text) * 0.25)
 End Sub

 Private Sub Check2_Click()
 Text8.Text = (Val(Text7.Text) * 0)
 End Sub

 Private Sub Combo1_Click()
 If Combo1 = "bisnis" Then
 Text6.Text = "TV+AC"
 Text7.Text = "250000"
 Else
 If Combo1 = "excutive" Then
 Text6.Text = "AC"
 Text7.Text = "200000"
 Else
 If Combo1 = "ekonomi" Then
 Text6.Text = "NON"
 Text7.Text = "150000"
 End If
 End If
 End If
 End Sub

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

 Private Sub Command2_Click()
 Text1.Text = ""
 Text4.Text = ""
 Text5.Text = ""
 Text6.Text = ""
 Text7.Text = ""
 Text8.Text = ""
 Text9.Text = ""
 Combo1.Text = ""
 Text1.SetFocus
 End Sub

 Private Sub Command3_Click()
 End
 End Sub

 Private Sub Form_Load()
 Text2 = Format(Now, "DD-MMMM-YYYY")
 Text3 = Format(Now, "HH:MM")
 Text2.Enabled = False
 Text3.Enabled = False

jangan Mlongo gitu geh bacanya biasa aja donk.. hehe😀

lanjut yang ke 8.. wkewkewke..

8.Pembayaran Rumah Sakit “Setiawan

Rumah sakit
Mau download Project & Form Via 4 Shared DISINI

Source Code Simak Dibawah ini…

 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 Check1_Click()
 Dim RWT, OBT, DOK As Single
 Dim BIAYA As Long
 If Check1.Value = 1 Then
 RWT = Val(Text5.Text) * Val(Text6.Text)
 Else
 RWT = 0
 End If
 If Check2.Value = 1 Then
 OBT = 200000
 Else
 OBT = 0
 End If
 If Check3.Value = 1 Then
 DOK = 250000
 Else
 DOK = 0
 End If
 BIAYA = RWT + OBT + DOK
 Text7.Text = BIAYA
 Text8.SetFocus
 End Sub

 Private Sub Check2_Click()
 Dim RWT, OBT, DOK As Single
 Dim BIAYA As Long
 If Check1.Value = 1 Then
 RWT = Val(Text5.Text) * Val(Text6.Text)
 Else
 RWT = 0
 End If
 If Check2.Value = 1 Then
 OBT = 200000
 Else
 OBT = 0
 End If
 If Check3.Value = 1 Then
 DOK = 250000
 Else
 DOK = 0
 End If
 BIAYA = RWT + OBT + DOK
 Text7.Text = BIAYA
 Text8.SetFocus
 End Sub

 Private Sub Check3_Click()
 Dim RWT, OBT, DOK As Single
 Dim BIAYA As Long
 If Check1.Value = 1 Then
 RWT = Val(Text5.Text) * Val(Text6.Text)
 Else
 RWT = 0
 End If
 If Check2.Value = 1 Then
 OBT = 200000
 Else
 OBT = 0
 End If
 If Check3.Value = 1 Then
 DOK = 250000
 Else
 DOK = 0
 End If
 BIAYA = RWT + OBT + DOK
 Text7.Text = BIAYA
 Text8.SetFocus
 End Sub

 Private Sub Combo1_Click()
 If Combo1 = "Kelas I" Then
 Text5.Text = 200000
 Text6.SetFocus
 Else
 If Combo1 = "Kelas II" Then
 Text5.Text = 150000
 Text6.SetFocus
 Else
 If Combo1 = "Kelas III" Then
 Text5.Text = 100000
 Text6.SetFocus
 End If
 End If
 End If
 End Sub

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

 Private Sub Command3_Click()
 Text1.Text = ""
 Text2.Text = ""
 Text3.Text = ""
 Text4.Text = ""
 Text5.Text = ""
 Text6.Text = ""
 Text7.Text = ""
 Text8.Text = ""
 Text9.Text = ""
 Combo1.Text = ""
 End Sub

 Private Sub Command4_Click()
 End
 End Sub

 Private Sub Form_Load()
 Combo1.AddItem "Kelas I"
 Combo1.AddItem "Kelas II"
 Combo1.AddItem "Kelas III"
 End Sub

weh g terasa udah dapet 8 hehe

lanjutkan yang ke 9.. Cemungut..!!😀

9.Huruf Mutu Nilai Mahasiswa.

Huruf Mutu Nilai MhsProject & Form tetep bisa di download kok haha via 4shared DISINI

Nah untuk Source Codenya Simak baik2 yah dibawah ini :

 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

10.Data Mahasiswa

Data Mahasiswa Adi Setiawan
Project & Form tetep bisa di download kok haha via 4shared DISINI

Nah untuk Source Codenya Simak baik2 yah dibawah ini :

 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 Text1_KEYPRESS(KEYASCII As Integer)
 If KEYASCII = 13 Then
 Text2.SetFocus
 End If
 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

Alhamdulillah Selesai sudah semua..
saya masih belajar, and masih newbie masalah Pemrograman, jadi buat Pak Dosen & Temen2 sekalian Para Master2 Pemrograman klu ada yang kurang pas tolong kritik dan saranya.. y🙂
Buat pak Dosen kasih Nilai yang Bagus iia pak.. hehe
Terimakasih..
Wassalamu’alaikum Wr. Wb.

By : Adi Setiawan19

4 thoughts on “Tugas Visual Basic #1 Tugas Ke 3

  1. We have decided to open our POWERFUL and PRIVATE web traffic system to the public for a limited time! You can sign up for our UP SCALE network with a free trial as we get started with the public’s orders. Imagine how your bank account will look when your website gets the traffic it deserves. Visit us today: http://bag.sh/16M

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