List Box
>> Dec 10, 2010
Open new project, add two list box controls to form1 and draw two list box as you wish on form1.
Double click on the form to open the code window. Add the following code to the load event:
Private sub form_load()
List1.additem "RAM"
List1.additem "HARDDISK"
List1.additem "CD"
List1.additem "MOUSE"
List1.additem "KEYBOARD"
END SUB
-> now, Add the below code to the Double click event of list1:
Private sub list1_dblclick()
List2.Additem list1.text
list1.removeitem list1.listindex
End Sub
-> now, Add the below code to the Double click event of list2:
Private sub list2_dblclick()
List1.additem List2.Text
List2.RemoveItem List2.ListIndex
End Sub
NOw, Run The form and test result
0 comments:
Post a Comment