Hi,
We always implement dragging and dropping by handling these events:
MouseDown event: record the index which will be moved.
DragOver event
DragDrop event: remove the item in the old listbox. Insert the item to the new listbox.
ListBox.IndexFromPoint(x,y) method can detect the item index.
More information:
Drag and Drop between list boxes - Beginner's Tutorial
http://www.codeproject.com/KB/dotnet/csdragndrop01.aspx
Control.DragDrop Event
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.dragdrop.aspx
If there anything unclear, please feel free to tell me.
Best regards,
Ling Wang
Please remember to click “Mark as Answer�on the post that helps you, and to click “Unmark as Answer�if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.