Current location - Recipe Complete Network - Complete cookbook - This VB program helps me to point out how to program, clearing is emptying, removing is deleting, and finally closing the window.
This VB program helps me to point out how to program, clearing is emptying, removing is deleting, and finally closing the window.
Add list 1, list2 and four buttons on the form with names corresponding to the title. The code is as follows.

Private Sub-Form _Load ()

Me. ScaleMode = 3

Add 100 demo menu and add your own recipes. This is just a demonstration.

For i = 1 to 100.

List 1。 AddItem "disk & amp"

Next, I

List 1。 Columns = 3' The setup menu displays three columns.

List 1。 Height = 100' Set the height.

End joint

Private sublist1_ dblclick ()' Double-click the menu item to add it automatically.

Listing 2. AddItem list 1. text

Listing 2. SetFocus

Listing 2. ListIndex = List2。 List count-1

End joint

Private Sub add _Click ()

Listing 2. AddItem list 1. text

End joint

Private Sub removes _Click ()

Listing 2. Delete item list 2. List index

Listing 2. SetFocus

End joint

Private Sub clear _Click ()

Listing 2. clear

End joint

Private Sub end _Click ()

Me. Hide or unload me.

End joint