I am tying to implement a drag-and-drop ability within a treeview. I could do eveything until i got to the point where i need to find a destination node to drop the dragged node. when i tried to get the node form the e.X and e.Y coordinates, i am not able to exactly get the node over which the mouse was pointing to when the drop occurred. Here is the DragDrop event handler i am using. If anybody has any clue..let me know .
Private Sub treeview1_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles treeview1.DragDrop
Dim DroppedNode, targetNode As TreeNode
Try
targetNode = CType(treeview1.GetNodeAt(PointToClient(New Point(e.X, e.Y))), TreeNode)
''the targetnode i get is not exactly same as the one i wanted
Catch ex As Exception
End Try
End Sub
Thnaks for any advice
anurc
Private Sub treeview1_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles treeview1.DragDrop
Dim DroppedNode, targetNode As TreeNode
Try
targetNode = CType(treeview1.GetNodeAt(PointToClient(New Point(e.X, e.Y))), TreeNode)
''the targetnode i get is not exactly same as the one i wanted
Catch ex As Exception
End Try
End Sub
Thnaks for any advice
anurc