This time I will give a tutorial, where I would make the program selection of courses.Immediately, quickly open your VB 6 and then make a form like the following picture. Then input the following code:
Private Sub cmd1_Click()
For i = 0 To Lst1.ListCount - 1
If Lst1.Selected(i) Then
MsgBox Lst1.List(i)
End If
Next i
End Sub
Private Sub cmdClear_Click()
Unload Me
End Sub
Private Sub Command1_Click()
If Lst1.ListIndex > -1 Then
Lst2.AddItem (Lst1.List(Lst1.ListIndex))
Lst1.RemoveItem (Lst1.ListIndex)
Label2.Caption = Lst1.ListCount
Label3.Caption = Lst2.ListCount
End If
End Sub
Private Sub Command2_Click()
If Lst2.ListIndex > -1 Then
Lst1.AddItem (Lst2.List(Lst2.ListIndex))
Lst2.RemoveItem (Lst2.ListIndex)
Label2.Caption = Lst1.ListCount
Label3.Caption = Lst2.ListCount
End If
End Sub
Private Sub Command3_Click()
Lst2.Clear
End Sub
Then run n 'taraaaaa please try .. you can modify them as needed.
- Blogger Comment
- Facebook Comment
Subscribe to:
Post Comments
(
Atom
)
0 komentar:
Post a Comment