Nicholas,
I think the drop event is never triggered, because the drag event should
have been fired first. For what ever reason, the tvMapItems_ItemDrag was not
fired, because there is no drag-move effect.
"Nicholas Paldino [.NET/C# MVP]" wrote:
[color=blue]
> That's the thing, without seeing what goes on in picMap_DragDrop, there
> is nothing that can be determined.
>
> I think that you should place try/catch blocks in your event handlers,
> and log if there are exceptions.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> -
mvp@spam.guard.caspershouse.com
>
> "Qingdong Z." <QingdongZ@discussions.microsoft.com> wrote in message
> news:BF95D5E1-F0D8-4971-98D1-2D0F3F0D7428@microsoft.com...[color=green]
> > Nicholas,
> >
> > Here is the code:
> >
> > Private Sub tvMapItems_ItemDrag(ByVal sender As Object, ByVal e As
> > System.Windows.Forms.ItemDragEventArgs) Handles tvMapItems.ItemDrag
> > If e.Item.GetType.Name = "FacilityMapNode" Then
> > DoDragDrop(e.Item, DragDropEffects.Move)
> > End If
> > End Sub
> >
> > Private Sub picMap_DragEnter(ByVal sender As Object, ByVal e As
> > System.Windows.Forms.DragEventArgs) Handles picMap.DragEnter
> > e.Effect = DragDropEffects.Move
> > End Sub
> >
> > Private Sub picMap_DragDrop(ByVal sender As Object, ByVal e As
> > System.Windows.Forms.DragEventArgs) Handles picMap.DragDrop
> > ...
> > End Sub
> >
> >
> > "Nicholas Paldino [.NET/C# MVP]" wrote:
> >[color=darkred]
> >> Qingdong,
> >>
> >> Without seeing the code, it is hard to say. Chances are there is
> >> some
> >> sort of exception being thrown, but because all of the drag/drop actions
> >> are
> >> performed in event handlers, the exception is swallowed.
> >>
> >> What you want to do is wrap all of your event handling code related
> >> to
> >> drag/drop in try/catch handlers, and see if an exception is thrown. Once
> >> you find out where it is thrown, you can work from there to figure out
> >> what
> >> the problem is.
> >>
> >> Hope this helps.
> >>[/color][/color]
>
>
>[/color]