VISUAL BASIC

"HURUF MUTU"

VBTUGAS VISUAL BASIC 6.0 KE-2NAMA : ADE IRFAN SETIAWANNPM : 11100013KELAS : YAHOO 1JURUSAN : SISTEM INFORMASI KODE PROGRAM:PERHITUNGAN GAJI Private Sub Command1_Click()Dim a, b, c, d, e, f As Integertxtd.Text = Val(Txta.Text) + Val(Txtb.Text) - Val(txtc.Text)txte.Text = Val(txtd.Text) * (0.1)txtf.Text = Val(txtd.Text) - Val(txte.Text)End Sub Private Sub Command2_Click()Txta.SetFocusTxta.Text = ""Txtb.Text = ""txtc.Text = ""txtd.Text = ""txte.Text = ""txtf.Text = ""End Sub Private Sub Command3_Click()Unload MeEnd Sub KODE PROGRAM:HURUF MUTUPrivate Sub Combo1_Click()Dim nama, jurusan As String Select Case Combo1.TextCase "11100013"nama = "ADE IRFAN SETIAWAN"jurusan = "SISTEM INFORMASI" Case "11100014"nama = "SONI F"jurusan = "SISTEM INFORMASI" Case "11100156"nama = " ADITYA"jurusan = "MANAJEMEN INFORMATIKA" Case "10100157"nama = "VANESSA"jurusan = "MANAJEMEN INFORMATIKA" End SelectText1.Text = namaText2.Text = jurusanText3.SetFocusEnd Sub Private Sub Command1_Click()Dim kuis, tugas, uts, uas, na As IntegerDim hm As Stringkuis = Val(Text3.Text)tugas = Val(Text4.Text)uts = Val(Text5.Text)uas = Val(Text6.Text)na = Val(kuis + tugas + uts + uas) / 4Text7.Text = na Select Case Text7.TextCase Is > 80hm = "A" Case Is > 70hm = "B" Case Is > 60hm = "C" Case Is > 50hm = "D" Case Is < 50hm = "E" End SelectText8.Text = hmEnd Sub Private Sub Command2_Click()Unload MeEnd Sub Private Sub Command3_Click()Combo1.Text = ""Text1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""Text6.Text = ""Text7.Text = ""Text8.Text = ""End Sub Private Sub Form_Load()Combo1.AddItem "11100013"Combo1.AddItem "11100014"Combo1.AddItem "11100156"Combo1.AddItem "10100157"End Sub Private Sub Text3_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenText4.SetFocusEnd IfEnd Sub Private Sub Text4_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenText5.SetFocusEnd IfEnd Sub Private Sub Text5_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenText6.SetFocusEnd IfEnd Sub KODE PROGRAM:PERHITUNGAN GAJI KARYAWAN Private Sub CMDLAGI_Click()kosongEnd Sub Private Sub cbogolongan_Click()Dim gapok, pajak, tunjangan, total As VariantSelect Case cbogolongan.TextCase "I"gapok = 1500000tunjangan = 150000Case "II"gapok = 2000000tunjangan = 200000Case "III"gapok = 2500000tunjangan = 250000Case "IV"gapok = 3000000tunjangan = 300000Case "V"gapok = 3500000tunjangan = 350000Case Elsegapok = 0tunjangan = 0End Selecttotal = gapok + tunjanganpajak = total * 0.1txtgapok.Text = gapoktxttunjangan.Text = tunjangantxtpajak.Text = pajaktxttotal.Text = total - pajak End SubPublic Sub kosong()txtnidn.SetFocustxtnidn.Text = ""txtnama.Text = ""cbogolongan.Text = ""txtgapok.Text = ""txttunjangan.Text = ""txtpajak.Text = ""txttotal.Text = ""End Sub Private Sub cmdBATAL_Click()txtnidn.SetFocustxtnidn.Text = ""txtnama.Text = ""cbogolongan.Text = ""txtgapok.Text = ""txttunjangan.Text = ""txtpajak.Text = ""txttotal.Text = ""End Sub Private Sub CMDKELUAR_Click()Unload MeEnd Sub Private Sub Form_Load()cbogolongan.AddItem "I"cbogolongan.AddItem "II"cbogolongan.AddItem "III"cbogolongan.AddItem "IV"cbogolongan.AddItem "V"End Sub Private Sub txtnidn_KeyPress(KeyAscii As Integer)If KeyAscii = 13 Thentxtnama.SetFocusEnd IfEnd Sub PRAKTIKUM VISUAL BASIC 6.0 KODE PROGRAM:Private Sub CMDEXIT_Click()Unload MeEnd Sub Private Sub CMDLAGI_Click()TXTKODE.SetFocusTXTKODE = ""TXTNAMA = ""TXTJUMLAH = ""TXTHARGA = ""txttotal = ""End Sub Private Sub cmdPROSES_Click()txttotal = Val(TXTJUMLAH.Text) * Val(TXTHARGA.Text)End Sub Private Sub TXTJUMLAH_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenTXTHARGA.SetFocusEnd IfEnd Sub Private Sub TXTKODE_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenTXTNAMA.SetFocusEnd IfEnd SubPrivate Sub TXTNAMA_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenTXTJUMLAH.SetFocusEnd IfEnd Sub KODE PROGRAM:Private Sub Command1_Click()TXTRATA = Val((TXTTUGAS.Text) + Val(TXTKUIS.Text) + Val(TXTUTS.Text) + Val(TXTUAS.Text)) / 4End Sub Private Sub Command2_Click()TXTNPM.SetFocusTXTNPM = ""TXTNAMA = ""TXTTUGAS = ""TXTKUIS = ""TXTUTS = ""TXTUAS = ""TXTRATA = ""End Sub Private Sub Command3_Click()Unload MeEnd Sub Private Sub TXTKUIS_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenTXTUTS.SetFocusEnd IfEnd Sub Private Sub TXTNAMA_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenTXTTUGAS.SetFocusEnd IfEnd Sub Private Sub TXTNPM_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenTXTNAMA.SetFocusEnd IfEnd Sub Private Sub TXTTUGAS_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenTXTKUIS.SetFocusEnd IfEnd Sub Private Sub TXTUTS_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenTXTUAS.SetFocusEnd IfEnd Sub KODE PROGRAM:Private Sub Command1_Click()Dim a, b, c, d As DoubleText3.Text = Val(Text1.Text) + Val(Text2.Text)End SubPrivate Sub Command2_Click()Text3.Text = Val(Text1.Text) - Val(Text2.Text)End SubPrivate Sub Command3_Click()Text3.Text = Val(Text1.Text) * Val(Text2.Text)End SubPrivate Sub Command4_Click()Text3.Text = Val(Text1.Text) / Val(Text2.Text)End SubPrivate Sub Command5_Click()Text1.SetFocusText1.Text = ""Text2.Text = ""Text3.Text = ""End SubPrivate Sub Command6_Click()Unload MeEnd SubPrivate Sub Command7_Click()Text3.Text = Val(Text1.Text) ^ Val(Text2.Text)End SubPrivate Sub Text1_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenText2.SetFocusEnd IfEnd Sub KODE PROGRAM:Private Sub YES_Click()txtnama.SetFocustxtnama.Text = ""Txtnpm.Text = ""txtkelas.Text = ""txtjurusan.Text = ""End SubPrivate Sub cmdclose_Click()Unload MeEnd SubPrivate Sub CMDYES_Click()txtnama.SetFocustxtnama.Text = ""Txtnpm.Text = ""txtkelas.Text = ""txtjurusan.Text = ""End SubPrivate Sub Form_Load()txtnama.Text = ""Txtnpm.Text = ""txtkelas.Text = ""txtjurusan.Text = ""End SubPrivate Sub txtkelas_KeyPress(KeyAscii As Integer)If KeyAscii = 13 Thentxtjurusan.SetFocusEnd IfEnd SubPrivate Sub txtnama_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenTxtnpm.SetFocusEnd IfEnd SubPrivate Sub Txtnpm_KeyPress(KeyAscii As Integer)If KeyAscii = 13 Thentxtkelas.SetFocusEnd IfEnd Sub KODE PROGRAM:Private Sub cmdkeluar_Click()MsgBox "ANDA INGIN KELUAR ?", vbQuestion + vbYesNoUnload MeEnd SubPrivate Sub cmdlagi_Click()Text1.SetFocusText1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""Text6.Text = ""End SubPrivate Sub cmdproses_Click()Dim s As StringText5.Text = "20" & Left(Text2.Text, 2)s = Mid(Text2.Text, 3, 1)If s = "1" ThenText3.Text = "sistem informasi"ElseIf s = "2" ThenText3.Text = "manajemen informatika"ElseIf s = Text3.Text = "3" ThenText3.Text = "teknik informatika"ElseIf s = "4" ThenText3.Text = "manajemen komputer"End Ifs = Mid(Text2.Text, 3, 2)If s = "10" ThenText4.Text = "strata satu"ElseIf s = "20" ThenText4.Text = "diploma tiga"ElseIf s = "30" ThenText4.Text = "diploma dua"ElseIf s = "40" ThenText4.Text = "diploma satu"End IfText6.Text = Right(Text2.Text, 3)End SubPrivate Sub Text1_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenText2.SetFocusEnd IfEnd Sub

About irfanstmik

KEJUJURAN ADALAH MODAL UTAMA UNTUK MEMPEROLEH KEPERCAYAAN

Posted on December 19, 2011, in Uncategorized. Bookmark the permalink. Leave a comment.

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

%d bloggers like this: