OBJEK
|
PROPERTIES
|
VALUE
|
FORM
|
name
|
frmlist
|
Caption
|
Listbox
|
|
BorderStyle
|
2-sizable
|
|
StartUpPosition
|
centerscreen
|
|
Listbox1
|
Name
|
lsthobby
|
Appearance
|
0-flat
|
|
Command1
|
Name
|
cmdok
|
Caption
|
&OK
|
|
Command2
|
Name
|
cmdtambah
|
Caption
|
&TAMBAH
|
|
Command3
|
Name
|
cmdhapus
|
caption
|
HAPUS
|
|
Command4
|
Name
|
cmdbersih
|
Caption
|
BERSIH
|
|
Command5
|
Name
|
cmdkeluar
|
Caption
|
KELUAR
|
KODE PROGRAM :
Private Sub
cmdbersih_Click()
lstHobby.Clear
End Sub
Private Sub
cmdexit_Click()
Unload Me
End Sub
Private Sub
cmdHapus_Click()
If
lstHobby.ListIndex < 0 Then
MsgBox "Data Tidak Ada Pilihan",
vbOKOnly + vbInformation, "Validasi"
Else
lstHobby.RemoveItem
(lstHobby.ListIndex)
End If
End Sub
Private Sub
cmdKeluar_Click()
End
End Sub
Private Sub
cmdOk_Click()
If lstHobby.ListIndex < 0 Then
MsgBox "Data Belum di Pilih",
vbOKOnly + vbInformation, "Validasi"
Else
MsgBox "Hobby Anda : " +
Str(lstHobby.ListIndex) + lstHobby.Text, vbOKOnly, "Hobby"
End If
End Sub
Private Sub
cmdTambah_Click()
lstHobby.AddItem
InputBox("Masukan Nama Hobby", "Tambah Hobby")
End Sub
Private Sub
Form_Load()
lstHobby.AddItem
"Mancing"
lstHobby.AddItem
"Membaca"
lstHobby.AddItem
"Jalan Sore"
lstHobby.AddItem
"Lari Pagi"
lstHobby.AddItem
"Tidur"
End Sub
Untuk teman2 yang ingin sewa hosting atau beli domain bisa disini iya : Link
dan gunakan Kode Kupon Berikut : YBNBLOG20 untuk mendapatkan potongan 5%
*KEJUJURAN ADALAH KEBIJAKSANAAN YANG PALING BAIK *
0 Comments