Hi,
I am writing a classic, "Explorer"-like app in vb.net 2003 (dotnetfx1.1).
I have written code to handle the dragging and dropping of items from a
ListView on the right hand part of the form to a TreeView on the left part of
the form. When the user pauses over a node in the TreeView in the middle of a
drag and drop operation, I'd like the node to automatically expand to reveal
the child nodes, just as you see in many commercial applications. However, I
am unable to create this behaviour because the TreeView control does not fire
the MouseHover event whilst in the middle of a drag and drop operation.
Are there any workarounds to this?
Regards,
James
Stoitcho Goutsev (100) - 07 Jun 2006 14:38 GMT
James,
During drag and drop operations no mouse messages are sent. In this case
windows enters special modal loop and sends special drag&drop notifcations
to the window under the mouse curosor if registered as potential drop
target.
In windows forms instead of expecting mouse events during D&D you need to
process: DragEnter, DragLeave, DragOver and DragDrop events. DragOver is
equivalent to MouseHover.

Signature
HTH
Stoitcho Goutsev (100)
> Hi,
>
[quoted text clipped - 18 lines]
>
> James
James - 07 Jun 2006 15:56 GMT
Thanks for this.
How would I simulate a MouseHover event during the DragOver event?
James
> James,
>
[quoted text clipped - 29 lines]
> >
> > James
Stoitcho Goutsev (100) - 07 Jun 2006 18:19 GMT
Why do you want to simulate it? Just use DragOver.

Signature
Stoitcho Goutsev (100)
> Thanks for this.
>
[quoted text clipped - 41 lines]
>> >
>> > James
Gamey - 21 Aug 2006 03:53 GMT
Well, I have a similar issue. For my app, I would like to process keyboard
input and or the mouse wheel during a drop operation. DoDragDrop eats all
mouse and keybouard input. The only thing I can get at is mouse button state
and the esc, ctrl, alt and shift keys which MS views as primarily relevant
for a dragdrop operation.
So... how can I get mouse wheel and keypress events or state from within
DragHover or anywhere else in the few methods available for handling drag
drop?
> Why do you want to simulate it? Just use DragOver.
>
[quoted text clipped - 43 lines]
> >> >
> >> > James