使用TREEVIEW的AfterSelect或DoubleClick事件就行

解决方案 »

  1.   

    int x;
    int y;
    tv_mousedown(sender e)
    {
    x = e.x;
    y = e.y;
    }tv_mouseclick(sender,e)
    {
        if (tv.getitemat(x,y) != null)
        {
        //do_NodeClickEvent
        }
    }
      

  2.   

    同意  jimh(jimmy) 的
      

  3.   

    我刚毕业是刚刚用.NET大侠们能说更清楚些吗,最好有详细的代码
      

  4.   

    private void tvUsers_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
    {
    .........
    string FullPath="";
    string strMod="";
        
    string[] s={};
    char[] arr=new char[]{'\\'};string[] s1={};
    char[] arr1=new char[]{'-'};
    Cursor tmp = this.Cursor;
    this.Cursor = Cursors.WaitCursor;
     
    try
    {
    ..........FullPath=e.Node.FullPath;
    s=FullPath.Split(arr);
    .......
    }
    catch(Exception a)
    {
    ...
    }
    finally
    {
    this.Cursor = tmp;
    }
    }
      

  5.   

    我的TreeView没有单击事件,我想楼主应该跟我一样
      

  6.   

    先谢谢各位,比如单击A结点执行A()单击B执行B()这样该怎摸办