How to control the cursor symbol during a DragDrop

  • Thread starter Thread starter **Developer**
  • Start date Start date
D

**Developer**

I have a Listbox application.
I allow users to drag items from one spot in the listbox to another spot.
I also allow them to drag to, say, WordPad

In the DoDragDrop I use DragDropEffects.Copy so that when dragging to
WordPad the copy cursor will show.
(If I use "DragDropEffects.Move Or DragDropEffects.Copy" WordPad show the
move cursor.)

But when the user moves an item from one spot to another in the listbox I'd
like the Move cursor to show.
(Because I do not copy the item I move it)
I've tried in the DragEnter to return DragDropEffects.Move but I think
because DragDropEffects.Move is not included in the DoDragDrop I then get
the slashed-circle cursor.

The question then is: How can I use only DragDropEffects.Copy in the
DoDragDrop so WordPad show the copy cursor and still show the move cursor
when the mouse cursor is over my ListBox?



Thanks
 
Developer,

Did you have a look at all kind of hoover events like Enter, MouseHoover,
MouseLeave etc etc.

I hope this helps,

Cor
 
I've implemented them all. Can I specify the cursor shape in one of them.
I think I did that a long time ago but am not sure.
I am sure that if I did I forgot how.


Thanks
 
Huh, I hadn't thought of doing that.
The Drag methods change the cursor depending on what e.Effect is set to so
I was focused on telling the drag system what cursor to use.
I'll try changing the cursor in the drag events but am not sure if that will
be overridden by the drag system.
So I'll see.
Unless someone suggest a more structured method.

Thanks
 
Back
Top