标签:
拖个contextMenuStrip控件
按钮的MouseDown事件:
private void treeView1_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)//此处为右击
{
contextMenuStrip1.Show(this, new Point(e.X, e.Y));
}
}
标签:
原文地址:http://www.cnblogs.com/Sukie-s-home/p/5336441.html