質問

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.

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top