I am trying to get a QueryContinueDragEvent per the MSDN tutorial on
Drag&Drop from a TreeView control.
My TreeView is at the same time source and destination (basically I am
trying to manually rearrange nodes). I try to abort the D&D when outside the
main form but I can not get the Query.. Event to fire; any ideas what's can
be wrong?

I've already installed handlers/subscribes for most (Ithink) related events
but no luck so far...

Thanks ahead!

TB

Re: TreeView missing QueryContinue..Event by Stoitcho

Stoitcho
Thu Jun 08 08:33:53 CDT 2006

tb2000,
QueryContinueDrag is fired on the source side only when the state of the
mouse or keyboard buttons is changed. It is not fired while the mouse just
moves around. There is no drag&drop event that you can use to cancel
operation when the mouse leaves the boundaries of a control. The operation
can be canceled only when the user presses/releases keyboard key or mouse
button. On the other side the target decides whether it understands the
dragged data and the drop is allowed.


--
HTH
Stoitcho Goutsev (100)

"tb2000" <tb2000@discussions.microsoft.com> wrote in message
news:2F74EB7B-D9EB-4598-9F70-545DADF0739F@microsoft.com...
>I am trying to get a Event per the MSDN tutorial on
> Drag&Drop from a TreeView control.
> My TreeView is at the same time source and destination (basically I am
> trying to manually rearrange nodes). I try to abort the D&D when outside
> the
> main form but I can not get the Query.. Event to fire; any ideas what's
> can
> be wrong?
>
> I've already installed handlers/subscribes for most (Ithink) related
> events
> but no luck so far...
>
> Thanks ahead!
>
> TB



Re: TreeView missing QueryContinue..Event by tb2000

tb2000
Thu Jun 08 11:22:01 CDT 2006

Stoitcho, thanks. I just found the bug; I had the eventhandler registered to
the parent class (this.Query.... instead of treeView.Query....).

However there is an example on MSDN how to abort drag ops e.g. when moving
outside a window - you do this by passing the cancel command back in the
EventArgs of exactly the query event.

And in my case I am now getting the event just by moving the mouse.

Well, and anyways thanx again!
Theo



"Stoitcho Goutsev (100)" wrote:

> tb2000,
> QueryContinueDrag is fired on the source side only when the state of the
> mouse or keyboard buttons is changed. It is not fired while the mouse just
> moves around. There is no drag&drop event that you can use to cancel
> operation when the mouse leaves the boundaries of a control. The operation
> can be canceled only when the user presses/releases keyboard key or mouse
> button. On the other side the target decides whether it understands the
> dragged data and the drop is allowed.
>
>
> --
> HTH
> Stoitcho Goutsev (100)
>
> "tb2000" <tb2000@discussions.microsoft.com> wrote in message
> news:2F74EB7B-D9EB-4598-9F70-545DADF0739F@microsoft.com...
> >I am trying to get a Event per the MSDN tutorial on
> > Drag&Drop from a TreeView control.
> > My TreeView is at the same time source and destination (basically I am
> > trying to manually rearrange nodes). I try to abort the D&D when outside
> > the
> > main form but I can not get the Query.. Event to fire; any ideas what's
> > can
> > be wrong?
> >
> > I've already installed handlers/subscribes for most (Ithink) related
> > events
> > but no luck so far...
> >
> > Thanks ahead!
> >
> > TB
>
>
>

Re: TreeView missing QueryContinue..Event by LaurieAPMarsh

LaurieAPMarsh
Wed Jul 05 13:26:02 CDT 2006

Shouldn't the QueryContinueDrag fire when the mouse button is released even
if the current effect is None? It doesn't seem to be firing for me so the
drag operation is over but my code doesn't know it.

"Stoitcho Goutsev (100)" wrote:

> tb2000,
> QueryContinueDrag is fired on the source side only when the state of the
> mouse or keyboard buttons is changed. It is not fired while the mouse just
> moves around. There is no drag&drop event that you can use to cancel
> operation when the mouse leaves the boundaries of a control. The operation
> can be canceled only when the user presses/releases keyboard key or mouse
> button. On the other side the target decides whether it understands the
> dragged data and the drop is allowed.
>
>
> --
> HTH
> Stoitcho Goutsev (100)
>
> "tb2000" <tb2000@discussions.microsoft.com> wrote in message
> news:2F74EB7B-D9EB-4598-9F70-545DADF0739F@microsoft.com...
> >I am trying to get a Event per the MSDN tutorial on
> > Drag&Drop from a TreeView control.
> > My TreeView is at the same time source and destination (basically I am
> > trying to manually rearrange nodes). I try to abort the D&D when outside
> > the
> > main form but I can not get the Query.. Event to fire; any ideas what's
> > can
> > be wrong?
> >
> > I've already installed handlers/subscribes for most (Ithink) related
> > events
> > but no luck so far...
> >
> > Thanks ahead!
> >
> > TB
>
>
>