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

Re: MouseHover event during drag and drop operations by Stoitcho

Stoitcho
Wed Jun 07 08:38:17 CDT 2006

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.


--
HTH
Stoitcho Goutsev (100)

"James" <James@discussions.microsoft.com> wrote in message
news:137B6F62-C4DF-495D-B2FF-1D0BC2F87D1E@microsoft.com...
> 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



Re: MouseHover event during drag and drop operations by James

James
Wed Jun 07 09:56:03 CDT 2006

Thanks for this.

How would I simulate a MouseHover event during the DragOver event?

James

"Stoitcho Goutsev (100)" wrote:

> 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.
>
>
> --
> HTH
> Stoitcho Goutsev (100)
>
> "James" <James@discussions.microsoft.com> wrote in message
> news:137B6F62-C4DF-495D-B2FF-1D0BC2F87D1E@microsoft.com...
> > 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
>
>
>

Re: MouseHover event during drag and drop operations by Stoitcho

Stoitcho
Wed Jun 07 12:19:49 CDT 2006

Why do you want to simulate it? Just use DragOver.


--

Stoitcho Goutsev (100)

"James" <James@discussions.microsoft.com> wrote in message
news:4B19948A-BFD2-42ED-B75F-5075DE75A326@microsoft.com...
> Thanks for this.
>
> How would I simulate a MouseHover event during the DragOver event?
>
> James
>
> "Stoitcho Goutsev (100)" wrote:
>
>> 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.
>>
>>
>> --
>> HTH
>> Stoitcho Goutsev (100)
>>
>> "James" <James@discussions.microsoft.com> wrote in message
>> news:137B6F62-C4DF-495D-B2FF-1D0BC2F87D1E@microsoft.com...
>> > 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
>>
>>
>>



Re: MouseHover event during drag and drop operations by Gamey

Gamey
Sun Aug 20 21:53:01 CDT 2006

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?

"Stoitcho Goutsev (100)" wrote:

> Why do you want to simulate it? Just use DragOver.
>
>
> --
>
> Stoitcho Goutsev (100)
>
> "James" <James@discussions.microsoft.com> wrote in message
> news:4B19948A-BFD2-42ED-B75F-5075DE75A326@microsoft.com...
> > Thanks for this.
> >
> > How would I simulate a MouseHover event during the DragOver event?
> >
> > James
> >
> > "Stoitcho Goutsev (100)" wrote:
> >
> >> 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.
> >>
> >>
> >> --
> >> HTH
> >> Stoitcho Goutsev (100)
> >>
> >> "James" <James@discussions.microsoft.com> wrote in message
> >> news:137B6F62-C4DF-495D-B2FF-1D0BC2F87D1E@microsoft.com...
> >> > 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
> >>
> >>
> >>
>
>
>