1 /// <summary> 2 /// MouseDown是鼠标按下事件发生在你鼠标单击事件之前,你单击鼠标发生了两个动作,一是鼠标按下二是鼠标抬起.执行之后,就会把SelectedNode转变成你鼠标点的那个节点了 3 /// </summary> 4 /// <param name="sender"></param> 5 /// <param name="e"></param> 6 public void Tv_MouseDown(object sender, MouseEventArgs e) 7 { 8 TreeView Tv_temp = (TreeView)sender; 9 10 if ((sender as TreeView) != null) 11 { 12 Tv_temp.SelectedNode = Tv_temp.GetNodeAt(e.X, e.Y); 13 } 14 }