Nama Objek |
Dan kode dari Progam tersebut jika di klik "txtkode" maka terdapat kode yang ada di bawah ini !!
Private Sub txtkode_KeyPress(KeyAscii As Integer)
Dim s As String
If KeyAscii = 13 Then
s = txtkode.Text
If s = "21400018" Then
lblhasil.Caption = "Isi Staples kecil" & vbLf & "Rp.2500"
Set Image1.Picture = LoadPicture(App.Path & "/isi staples kecil.jpg")
ElseIf s = "4970129727514" Then
lblhasil.Caption = "Spidol Snowman" & vbLf & "Rp.6500"
Set Image1.Picture = LoadPicture(App.Path & "/spidol snowman.jpg")
ElseIf s = "02110097" Then
lblhasil.Caption = "Tinta Blueprint 100" & vbLf & "Rp.30000"
Set Image1.Picture = LoadPicture(App.Path & "/tinta.jpg")
ElseIf s = "091163224457" Then
lblhasil.Caption = "Mouse Genius USB" & vbLf & "Rp.35000"
Set Image1.Picture = LoadPicture(App.Path & "/Mouse genius.jpg")
ElseIf s = "6RX84CXX." Then
lblhasil.Caption = "Hardisk Maxtor 80GB" & vbLf & "Rp.250000"
Set Image1.Picture = LoadPicture(App.Path & "/hardisk maxtor.jpg")
Else
lblhasil.Caption = "sepuntene barangnipun dereng terdaftar"
Set Image1.Picture = LoadPicture(App.Path & "/No image.jpg")
End If
txtkode.Text = ""
txtkode.SetFocus
End If
End Sub
DAN jika "txtkode" diberikan kode atau nomer di bawah ini
1. 21400018
Kode |
Kode diatas di masukan ke progam lalu di ENTER
Hasil |
Dan Hasilnya Seperti di atas !!
2. 4970129727514
Kode |
Dan setelah di "ENTER" hasilnya akan seperti di atas
3. 02110097
Nomer di tulis dulu pertama-tama ,lalu klik "ENTER" seperti di atas
Dan setelah di "ENTER" Hasilnya ada seperti di atas
4. 091163224457
Tidak ada komentar:
Posting Komentar