Question Drag multiple items from one listbox to another

HichamDotNet

Member
Joined
Mar 10, 2011
Messages
9
Programming Experience
3-5
Hi,
I've looked everywhere on the internet for multiple items drag&drop between listboxes and found only examples showing single item drag.
I know how to make a single item dragdrop operation between two listboxes using MouseDown, DoDragDrop, DragEnter, DragDrop

Now what I'm looking forward to learn is the ability of dragging more than one item from one listbox and dropping them in another listbox

Thank you for your help
 

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,324
Location
Norway
Programming Experience
10+
MultiSimple mode: start the drag operation immediately when selecting last item, ie don't release mouse and then start drag.
MultiExtended mode: select multiple using Ctrl or Shift key, but do not release the key until the drag operation has started.
 

HichamDotNet

Member
Joined
Mar 10, 2011
Messages
9
Programming Experience
3-5
Thank you John for your answer
I've come across a good idea on the internet : Using ListViews instead of ListBoxes.
A ListView offers a more normal behavior in a Drag operation. Multiple items can be selected and dragged normally.
For anyone who would like to learn about it, take a look at a very good example here:
http://msdn.microsoft.com/en-us/library/aa289508(v=vs.71).aspx#vbtchimpdragdropanchor7
Choose : Dragging between lists

Thanks a lot
 
Last edited:
Top Bottom