tugas 4-4

tugas 4-4

Private Sub cmdbatal_Click()
txtko.SetFocus
txtko.Text = “”
txtjudul.Text = “”
txtpengarang.Text = “”
txtTb.Text = “”
txtpenerbit.Text = “”
txtharga.Text = “”
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub cmdlagi_Click()
txtko.SetFocus
txtko.Text = “”
txtjudul.Text = “”
txtpengarang.Text = “”
txtTb.Text = “”
txtpenerbit.Text = “”
txtharga.Text = “”
End Sub
End Sub

Private Sub cmdproses_Click()
Dim S As String
S = Mid(text1.Text, 1, 3)
If S = “SIM” Then
text1.Text = “Sistem Informasi Manajemen”
text2.Text = “Fadiya Ulfa”
text5.Text = 75900
ElseIf S = “EDP” Then
text1.Text = “Elektronik Data Processing”
text2.Text = “Nurul Agustina”
text5.Text = 62000
ElseIf S = “MNJ” Then
text1.Text = “Manajemen”
text2.Text = “Rian Hidayat”
text5.Text = 42000
ElseIf S = “CDR” Then
text1.Text = “Corel Draw”
text2.Text = “Siti Nur Khotimah”
text5.Text = 53000
ElseIf S = “RPL” Then
text1.Text = “Rekayasa Perangkat Lunak”
text2.Text = “Winda Erlianti”
text5.Text = 83000
End If
S = Right(text1.Text, 1)
If S = “A” Then
text4.Text = “Andi Offset Yogyakarta”
ElseIf S = “I” Then
text4.Text = “Indah Surabaya”
ElseIf S = “S” Then
text4.Text = “Salemba Empat”
ElseIf S = “E” Then
text4.Text = “Elek Media Komputindo”
ElseIf S = “M” Then
text4.Text = “Maxicom”
End If

S = Mid(text1.Text, 5, 2)
If S = “09” Then
text3.Text = “2009”
ElseIf S = “10” Then
text3.Text = “2010”
ElseIf S = “11” Then
text3.Text = “2011”
ElseIf S = “12” Then
text3.Text = “2012”
ElseIf S = “13” Then
text3.Text = “2013”
End If
End Sub

tugas vb 4-3

tugas vb 4-3

Private Sub Command1_Click()
Dim S As String
S = Mid(cbokode.Text, 3, 3)
If S = “SIM” Then
txtjudul.Text = “Sistem Informasi Manajemen”
txtpengarang.Text = “Yati Nur Oktavia”
txtharga.Text = 75900
ElseIf S = “EDP” Then
txtjudul.Text = “Elektronik Data Processing”
txtpengarang.Text = “Imam Tarmizi”
txtharga.Text = 62000
ElseIf S = “MNJ” Then
txtjudul.Text = “Manajemen”
txtpengarang.Text = “Valentina Mariana Adiwiyanti”
txtharga.Text = 42000
ElseIf S = “CDR” Then
txtjudul.Text = “Corel Draw”
txtpengarang.Text = “Riyan Suhandi”
txtharga.Text = 53000
ElseIf S = “RLP” Then
txtjudul.Text = “Rekayasa Perangkat Lunak”
txtpengarang.Text = “Sinta Umpu Singa”
txtharga = 83000
End If
S = Left(Combo1.Text, 1)
If S = “A” Then
txtpenerbit.Text = “Andi Offset Yogyakarta”
ElseIf S = “I” Then
txtpenerbit.Text = “Indah Surabaya”
ElseIf S = “S” Then
txtpenerbit.Text = “Salemba Empat”
ElseIf S = “E” Then
txtpenerbit.Text = “Elek Media Komputindo”
ElseIf S = “M” Then
txtpenerbit.Text = “Maxicom”
End If

S = Right(Combo1.Text, 2)
If S = “01” Then
txttb.Text = “2001”
ElseIf S = “02” Then
txttb.Text = “2002”
ElseIf S = “03” Then
txttb.Text = “2003”
ElseIf S = “04” Then
txttb.Text = “2004”
ElseIf S = “05” Then
txttb.Text = “2005”
End If
End Sub

Private Sub Command2_Click()
cbokode.SetFocus
txtjudul.Text = “”
txtpengarang.Text = “”
txttb.Text = “”
txtpenerbit.Text = “”
txtharga.Text = “”

End Sub

Private Sub Command3_Click()
cbokode.SetFocus
txtjudul.Text = “”
txtpengarang.Text = “”
txttb.Text = “”
txtpenerbit.Text = “”
txtharga.Text = “”

End Sub

Private Sub Command4_Click()
Unload Me
End Sub
Private Sub Form_Load()
cbokode.AddItem “A-SIM-01”
cbokode.AddItem “I-EDP-02”
cbokode.AddItem “S-MNJ-03”
cbokode.AddItem “E-CDR-04”
cbokode.AddItem “M-RPL-05”
End Sub

tugas vb pertemuan 4-2

tugas vb pertemuan 4-2

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

tugas pertemuan ke 4-1

tugas pertemuan ke 4-1

Private Sub Command1_Click()
Dim S As String
S = Mid(Text11.Text, 1, 4)
Text4.Text = S

S = Mid(Text11.Text, 5, 1)
If S = “A” Then
Text1.Text = “A”
Text5.Text = “Manajer”
Text7.Text = “4000000”
Text8.Text = “1025000”
Text9.Text = (Val(Text7.Text) + Val(Text8.Text))
ElseIf S = “B” Then
Text1.Text = “B”
Text5.Text = “Ka. Seksi”
Text7.Text = “3500000”
Text8.Text = “975000”
Text9.Text = (Val(Text7.Text) + Val(Text8.Text))
ElseIf S = “C” Then
Text1.Text = “C”
Text5.Text = “Staff”
Text7.Text = “3000000”
Text8.Text = “925000”
Text9.Text = (Val(Text7.Text) + Val(Text8.Text))
End If

S = Mid(Text11.Text, 7, 1)
If S = “S” Then
Text1.Text = “S”
Text3.Text = “Single”
ElseIf S = “M” Then
Text2.Text = “M”
Text3.Text = “Menikah”
ElseIf S = “J” Then
Text2.Text = “J”
Text3.Text = “Janda”
ElseIf S = “D” Then
Text2.Text = “D”
Text3.Text = “Duda”
End If
S = Right(Text11.Text, 3)
If S = “KEU” Then
Text6.Text = “Accounting”
ElseIf S = “ADM” Then
Text6.Text = “Administrasi”
ElseIf S = “SDM” Then
Text6.Text = “General Affair”
ElseIf S = “EDP” Then
Text6.Text = “IT Unit”
ElseIf S = “SPM” Then
Text6.Text = “Security”
End If
End Sub

Private Sub Command2_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
Text6.Text = “”
Text7.Text = “”
Text8.Text = “”
Text9.Text = “”
Text10.Text = “”
Text11.Text = “”
End Sub

Private Sub Command3_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
Text6.Text = “”
Text7.Text = “”
Text8.Text = “”
Text9.Text = “”
Text10.Text = “”
Text11.Text = “”
End Sub

Private Sub Command4_Click()
Unload Me
End Sub

Private Sub Text10_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text11.SetFocus
End If
End Sub

MEMBUAT PROGRAM PT. PULANG PETANG MENGGUNAKAN VB 6.0


Slide1

 

Code :

 

Private Sub Command1_Click(Index As Integer)
Dim s As String
txtth.Text = Left(Text2.Text, 4)
s = Mid(Text2.Text, 5, 1)
If s = “A” Then
txtgol.Text = “A”
txtjb.Text = “Manager”
txtgp.Text = “4000000″
txttj.Text = “1025000″
ElseIf s = “B” Then
txtgol.Text = “B”
txtjb.Text = ” Ka. Seksi”
txtgp.Text = “3500000″
txttj.Text = “975000″
ElseIf s = “C” Then
txtgol.Text = “C”
txtjb.Text = “Staff”
txtgp.Text = “3000000″
txttj.Text = “925000″
End If
s = Mid(Text2.Text, 7, 1)
If s = “S” Then
txtkod.Text = “S”
txtst.Text = “Singel”
ElseIf s = “M” Then
txtkod.Text = “M”
txtst.Text = “Menikah”
ElseIf s = “J” Then
txtkod.Text = “J”
txtst.Text = “Janda”
ElseIf s = “D” Then
txtkod.Text = “D”
txtst.Text = “Duda”
End If
s = Mid(Text2.Text, 9, 3)
If s = “KEU” Then
txtbg.Text = “Accounting”
ElseIf s = “ADM” Then
txtbg.Text = “Administrasi”
ElseIf s = “SDM” Then
txtbg.Text = “General Affair”
ElseIf s = “EDP” Then
txtbg = “IT Unit”
ElseIf s = “Spm” Then
txtbg.Text = “Security”
End If
txttg.Text = Val(txtgp.Text) + Val(txttj.Text)
End Sub

Private Sub Command2_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
txtgol.Text = “”
txtkod.Text = “”
txtst.Text = “”
txtth.Text = “”
txtjb.Text = “”
txtbg.Text = “”
txtgp.Text = “”
txttj.Text = “”
txttg.Text = “”
End Sub

Private Sub Command3_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
txtgol.Text = “”
txtkod.Text = “”
txtst.Text = “”
txtth.Text = “”
txtjb.Text = “”
txtbg.Text = “”
txtgp.Text = “”
txttj.Text = “”
txttg.Text = “”
End Sub

Private Sub Command4_Click()
Unload Me
End Sub

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

MEMBUAT PROGRAM PERHITUNGAN HARTA SETELAH DI DISCOUNT 10%


Slide1

Code :

Private Sub Command2_Click()
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text1.SetFocus
End Sub

Private Sub Command3_Click()
Unload Me
End Sub

Private Sub Command1_Click()
Text2.Text = Val(Text1.Text) * 0.1
Text3.Text = Val(Text1.Text) – Val(Text2.Text)
Text1.SetFocus
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.Text = Val(Text1.Text) * 0.1
Text3.Text = Val(Text1.Text) – Val(Text2.Text)
Text1.SetFocus
End If
End Sub

MEMBUAT PROGRAM MEMBERI EFEK PADA HURUF MENGGUNAKAN VB 6.0

Slide1

 

Code :

Private Sub ckbold_Click()
If ckbold.Value = 1 Then
Label1.FontBold = True
ElseIf ckbold.FontBold = 0 Then
Label1.FontBold = False
End If
End Sub

Private Sub ckitalic_Click()
If ckitalic.Value = 1 Then
Label1.FontItalic = True
ElseIf ckitalic.Value = 0 Then
Label1.FontItalic = False
End If
End Sub

Private Sub ckstriketout_Click()
If ckstriketout.Value = 1 Then
Label1.FontStrikethru = True
ElseIf ckstriketout.Value = 0 Then
Label1.FontStrikethru = False
End If
End Sub

Private Sub ckunderline_Click()
If ckunderline.Value = 1 Then
Label1.FontUnderline = True
ElseIf ckunderline.Value = 0 Then
Label1.FontUnderline = False
End If
End Sub

Private Sub cmd_Click()
Unload Me
End Sub
Private Sub optblue_Click()
If optblue.Value = True Then
Label1.ForeColor = vbBlue
End If
End Sub

Private Sub optgreen_Click()
If optgreen.Value = True Then
Label1.ForeColor = vbGreen
End If
End Sub

Private Sub optred_Click()
If optred.Value = True Then
Label1.ForeColor = vbRed
End If
End Sub

Private Sub optyellow_Click()
If optyellow.Value = True Then
Label1.ForeColor = vbYellow
End If
End Sub

MEMBUAT PROGRAM DATA BUKU STMIK PRINGSEWU 2 MENGGUNAKAN VB 6.0


Slide1

Code :

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

MEMBUAT PROGRAM DATA BUKU MAHASISWA STMIK PRINGSEWU MENGGUNAKAN VB 6.0


Slide1

 

Code :

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, 1, 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, 3, 3)
If s = “SIM” Then
txtjb.Text = “Sistem Informasi Manajemen”
txtpeng.Text = “Andra Setiawan”
txthrg.Text = “75900″

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

ElseIf s = “MNJ” Then
txtjb.Text = “Manajemen”
txtpeng.Text = “Sandy Fitrajaya”
txthrg.Text = “42000″

ElseIf s = “CDR” Then
txtjb.Text = “Corel Draw”
txtpeng.Text = “Tri Indah Sari”
txthrg.Text = “62000″

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