tugas ppde daftar kode ascii

0

Daftar kode ASCII yang dapat ditampilkan

Pas perlu, kadang hal yang kecil susah ditemukan. Perlengkapan kecil dalam pemrograman, salah satunya adalah daftar kode ASCII. Kode ini bernilai dari 0 sampai 127 (128 kode) meskipun tidak semuanya dapat ditampilkan di dalam program. Kode bernilai sampai dengan 31 dinamakan kode control, sedangkan 32 sampai dengan 126 adalah kode ASCI yang dapat ditampilkan. Alfabet A sampai Z diwakili oleh kode desimal 65 sampai 90. Bagaimana dengan kode yang lain?

tugas vb

0

5

Private Sub Form_load()
Combo1.AddItem “I”
Combo1.AddItem “II”
Combo1.AddItem “III”
Combo1.AddItem “IV”
End Sub

Private Sub Command1_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
Text6.Text = “”
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()
Unload Me
End Sub

Private Sub combo1_Click()
Dim gapok, pajak, tunjangan, total As Variant
Select Case Combo1.Text
Case “1″
Text3 = 1500000
Text4 = 150000
Case “II”
Text3 = 2000000
Text4 = 200000
Case “III”
Text3 = 2500000
Text4 = 250000
Case “IV”
Text3 = 3000000
Text4 = 300000
Case Else
Text3 = 0
Text4 = 0
End Select
Text6 = Val(Text3.Text) + Val(Text4.Text)
Text5 = Val(Text6.Text) * 0.1
Text6.Text = Val(Text6.Text) – Val(Text5.Text)
End Sub

Private Sub text1_keypress(keyascii As Integer)
If keyascii = 13 Then
Text2.SetFocus
End If
End Sub

tugas vb

0
  1. 6

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

tugas vb

0

7

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

perhitungan harga diskon 10% rudi setiawan

0

ssssss

PROGRAM SETELAH DISKON

 

 

Private Sub CmdHASIL_Click()

TxtYHS2.Text = Val(TxtYHS1.Text) * 0.1

TxtYHS3.Text = Val(TxtYHS1.Text) – Val(TxtYHS2.Text)

End Sub

 

Private Sub CmdKELUAR_Click()

Unload Me

End Sub

 

Private Sub CmdLAGI_Click()

TxtYHS1.SetFocus

TxtYHS1 = “”

TxtYHS2 = “”

TxtYHS3 = “”

End Sub

 

Private Sub TxtYHS1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

TxtYHS2.Text = Val(TxtYHS1.Text) * 0.1

TxtYHS3.Text = Val(TxtYHS1.Text) – Val(TxtYHS2.Text)

End If

End Sub

 

 

kalkulator mini tugas vb by rudi s

0

rudiiiiii rudi setiawan

PROGRAM KALKULATOR MINI

 

 

Private Sub Command1_Click()

TxtYHS3.Text = Val(TxtYHS1.Text) + Val(TxtYHS2.Text)

TxtYHS4.Text = Val(TxtYHS1.Text) * Val(TxtYHS2.Text)

TxtYHS5.Text = Val(TxtYHS1.Text) – Val(TxtYHS2.Text)

End Sub

 

 

Private Sub Command2_Click()

TxtYHS1.SetFocus

TxtYHS1 = “”

TxtYHS2 = “”

TxtYHS3 = “”

TxtYHS4 = “”

TxtYHS5 = “”

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

 

Private Sub TxtYHS1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

TxtYHS2.SetFocus

End If

End Sub

 

Private Sub TxtYHS2_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

TxtYHS3.Text = Val(TxtYHS1.Text) + Val(TxtYHS2.Text)

TxtYHS4.Text = Val(TxtYHS1.Text) * Val(TxtYHS2.Text)

TxtYHS5.Text = Val(TxtYHS1.Text) – Val(TxtYHS2.Text)

End If

End Sub