Question

I'm having trouble while making a custom control in which users can drag ListviewItems.
I want to give the user some graphical feedback as for where the dropped items will go, but the MouseMove event does not fire when drag & dropping.

Is there anything I can do except for starting/stopping a timer on onDragEnter and onDragLeave ?

The control users can drag tracks into This is the control I'm talking about, this should make my idea pretty clear.

Was it helpful?

Solution

I've used something like this before in the DragOver event handler of ListBox:

Dim intIndex As Integer
intIndex = ListBox1.IndexFromPoint(ListBox1.PointToClient(New Point(e.X, e.Y)))
ListBox1.SelectedIndex = intIndex

Maybe it's possible you could do something similar with your custom control. Sorry this is in VB not C#, but I imagine it wouldn't be too hard to translate.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top