private void treeView1_DragDrop(object sender, DragEventArgs e) { if (renderScene == null) { return; } TreeNode myNode = null; ControlDDData data = e.Data.GetData(typeof(ControlDDData)) as ControlDDData; if (data != null && data.extNode is TreeNode) { myNode = data.extNode as TreeNode; } else { return; } Point Position = Point.Empty; Position.X = e.X; Position.Y = e.Y; Position = treeView1.PointToClient(Position); TreeNode DropNode = this.treeView1.GetNodeAt(Position); if (DropNode == null || DropNode.Parent == myNode || DropNode == myNode) { return; } renderScene.changePosByUniQue(myNode.Tag as String, DropNode.Tag as String); reloadSceneInfo(); }