How can I copy a list box ot another?

DeltaWolf7

Well-known member
Joined
Jan 21, 2006
Messages
47
Programming Experience
Beginner
Hi,

Sorry for the newbie question. I am trying to learn the ins and outs of vb.net 2005.
How do i copy the whole content from one list box to another?
I manager to do it with one item, but I dont understand loops enough to work out how to do all items.

any help welcome.

Thank you
 
You don't have to use a loop, unless you want to add special processing or modify the items during the transfer to another listbox. Example:
VB.NET:
[SIZE=2]ListBox2.Items.AddRange(ListBox1.Items)
[/SIZE]
 
Back
Top