private void menuItem5_Click(object sender, System.EventArgs e)
{
    try
    {
        MessageBox.Show("you click menuitem5");
    }
    catch (Exception ex)
    {
        MessageBox.Show(ex.ToString());
    }
}

解决方案 »

  1.   

    this.richTextBox1.ContextMenu = this.contextMenu1;在  private void InitializeComponent() 
    中直接添加  
    使用菜单的控件.ContextMenu = 上下问菜单控件名   就可以了
      

  2.   

    Sorry,看错了,
    我的时间就是用
    private void menuItem1_Click(object sender, System.EventArgs e)
    {
        this.richTextBox1.Text = "hello";
    }
    没有问题啊~可以用的。是不是你自己处理时间的函数有问题啊?
      

  3.   

    this.menuItem1.Click += new System.EventHandler(this.menuItem1_Click);