在TreeView中添加MouseUp事件,再在事件响应中判断是否为右键
private void OnMouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
// We are only interested in right mouse clicks
if( e.Button == MouseButtons.Right )
{
// Attempt to get the node the mouse clicked on
TreeNode node = treeAlbum.GetNodeAt(e.X, e.Y);
if(node != null)
{
// Select the tree item
treeAlbum.SelectedNode = node;
         // Add What's you want
}
}
}