日期:2014-05-18 浏览次数:21113 次
private void richTextBox1_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
//弹出右键菜单
this.contextMenuStrip1.Show( MousePosition );
}
}
------解决方案--------------------
自己用contextmenustrip
然后在里面写你要实现的方法
------解决方案--------------------
同意同意
控件上的contextmenustrip属性就是做这用!
------解决方案--------------------
contextmenustrip
然后你用的记事本是richtextbox吧,把这个控件的contextmenu属性连到你定义的contextmenustrip上!!!