I was trying to implement drag and drop in treeview . I generate the root nodes first then if I drag any item over the treeview I want to put it under exact root nodes. I need something like
private void treeView1_DragOver(object sender, DragEventArgs e)
{
TreeNode tNode = FindNodeAtPoint(e.X, e.Y);
}
so that from tNode I can find it's root node and can populate it under that parent node.
can anybody help me out with findNodeAtPoint() functinoality.
private TreeNode FindNodeAtPoint(int x, int y)
{
Point p = new Point(x, y);
p = PointToClient(p);
................
................
................
}