Click here to Skip to main content
15,918,243 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I would like to trigger drag events when I drag selected items from a ListView in a Windows Forms application onto the enclosing form. The ListView AllowDrop Property is set to True to allow dragging within the ListView.

What I have tried:

If I set the form AllowDrop property to = true, the drag events are triggered when I drag items from outside the form, but not when I select ListView Items and drag them onto the enclosing form.
Posted
Updated 16-Oct-19 11:16am

See CodeProject article here: Drag and Drop List View[^]
And also: A Simple Drag And Drop How To Example[^]
 
Share this answer
 
v2
I found the solution was changing form DragEnter code to
I private void Form_DragEnter(object sender, DragEventArgs e) { e.Effect = DragDropEffects.All; } 
.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900