楼上兄台:
VSTreeNode SubFirst = new VSTreeNode(); SubFirst.Text = String.Format("阿超", 1);
SubFirst.ContextMenuStrip = this.MyContextMenuStrip;
我这种是在树节点那里加载菜单,请问怎么才能在加载的时候传递参数进去呀?MyContextMenuStrip
VSTreeNode SubFirst = new VSTreeNode(); SubFirst.Text = String.Format("阿超", 1);
SubFirst.ContextMenuStrip = this.MyContextMenuStrip;
我这种是在树节点那里加载菜单,请问怎么才能在加载的时候传递参数进去呀?MyContextMenuStrip
主要的问题是我那菜单是属于ContextMenuStrip 里的一项子菜单,
我用(xxx)Sender.Text 是取不到值的,请教下有什么好办法吗?
private void 发送消息ToolStripMenuItem_Click(object sender, EventArgs e)
{
MessageBox.Show(this.contextMenuStrip1.SourceControl.Text);
}
高手指导的
代码如下: private void 发送消息ToolStripMenuItem_Click(object sender, EventArgs e)
{
MessageBox.Show(this.contextMenuStrip1.SourceControl.Text);
}用.SourceControl