Salient features of Listbox in visual basic 6.0
Do you know about the Listbox in visual basic? The Listbox is very common to control that we are used in visual basic 6.0. Normally Listbox control is used for displaying the data in list format. Here we will see about the features of Listbox in visual basic and how to implement Listbox in visual basic form.
How to implements Listbox in visual basic form?
- First, create a new form.
- Then drag and drop Listbox control.
- After that choose another control for performing the Listbox operations.
Simple source code for implements the Listbox in visual basic 6.0
Private Sub Command1_Click()
If chk1 = vbChecked Then
List1.AddItem "List-1"
End If
If chk2 = vbChecked Then
List1.AddItem "List-2"
End If
If chk3 = vbChecked Then
List1.AddItem "List-3"
End If
If chk4 = vbChecked Then
List1.AddItem "List-4"
End If
End Sub
Private Sub Command2_Click()
List1.Clear
End SubHow to work Listbox in visual basic 6
Why Listbox is useful for us in visual basic programming
If you think why Listbox is
useful to us then ask that students who are working on something project
or creating any projects they will tell you why Listbox is useful in our
project. Sometimes we want to send the data in the next form by choosing the specific
field that time the Listbox is very useful.
I hope you enjoy this post, and if you have any queries about the Listbox then comment to me in the comment box I will try to help solve your problems.
0 Comments