it is probably too late inside Table_Click, get the node in TreeView's MouseUp, save the node, see24.12 How can I display a context menu when the user right-clicks on a node in the TreeView control?
http://www.syncfusion.com/FAQ/WinForms/FAQ_c91c.asp#q1097qPoint ClickPoint = new Point(e.X,e.Y); 
 
TreeNode ClickNode = treeView1.GetNodeAt(ClickPoint); //save ClickNode somewhere
 

解决方案 »

  1.   

    TreeNode在private void treeView1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)可以读出来老大的意思是定义一个全局TreeNode变量?然后在Table_Click事件里直接读这个变量?
    这个好像不是很保险阿,除了这个还有没有其他办法?
      

  2.   

    look into ContextMenu'spublic void Show(
       Control control,
       Point pos
    );you might be able to figure out how to display the menu wrt the TreeNode, then check contextMenu.SourceControl in Table_Click, if that is not what you want, then you have to save the TreeNode somewhere>>>这个好像不是很保险阿why is that? after all, it is a Desktop application, isn't it?