Enable VB6 via the Start button.
Setting its properties each object are as follows:
| object | properties | value |
| Form2 | Caption StartUpPosition | Method test 2-centerScreen |
| List1 | - | - |
| Combo1 | - | - |
| Command1 | Caption | Add |
| Command2 | Caption | Delete |
| Command3 | Caption | Clear |
1.2 Writing Program Code: Test Method
In the Code Editor type the code is as follows:
Private Sub Form_Load ()
Combo1.AddItem "justin"
Combo1.AddItem "Bieber"
Combo1.AddItem "david"
Combo1.AddItem "Shafira"
end Sub
Private Sub Command1_Click ()
List1.AddItem Combo1.Text
end Sub
Private Sub Command2_Click ()
List1.RemoveItem List1.ListIndex
end Sub
Private Sub Command3_Click ()
List1.Clear
end Sub
save form2.
Tidak ada komentar:
Posting Komentar