here i have 2 listbox i already have the code for the selected item moving right and moving left but i don't know how to move all of the listbox1 to listbox2 by just click >> or listbox2 to listbox1 <<
Shodow
3
Junior Poster
Recommended Answers
Jump to PostJust use looping.
If you already manage to move single item, then use looping to move all items.
Jump to PostHi,
Try with this,
Private Sub Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button.Click
Dim i, j As Integer
i = ListBox1.Items.Count()
For j = 0 To i - 1
ListBox2.Items.Add(ListBox1.Items(j))
Next j
ListBox1.Items.Clear()
End Sub
All 7 Replies
Jx_Man
987
Nearly a Senior Poster
Featured Poster
Shodow
3
Junior Poster
kothaisaravan
0
Light Poster
GeekByChoiCe
152
Practically a Master Poster
Featured Poster
Shodow
3
Junior Poster
GeekByChoiCe
152
Practically a Master Poster
Featured Poster
Shodow
3
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.