我有个程序,想实现动态为contextMenuStrip指定菜单,并添加事件,
protected void contextMenuStrip1_Popup(System.Object sender, System.EventArgs e)

  //这里怎么写?我指导怎么添加菜单,但是不知道怎么添加事件,就添加下面的那个事件
contextMenuStrip1.Items.Add("check");
 }
我手上的例子是这样写的: contextMenuStrip1.Items.Add("check", new System.EventHandler(this.Checked_OnClick));
但是在2005中提示有错误
///////这是事件处理函数,
        protected void Checked_OnClick(System.Object sender, System.EventArgs e)
        {
            if (contextMenuStrip1.SourceControl == radioButtonTest)
                radioButtonTest.Checked = true;
            else if (contextMenuStrip1.SourceControl == checkBox1)
                checkBox1.Checked = true;
        }谢谢: