MainForm中的代码; ToolStripMenuItem1.Visible = false;
Form1 ss=New Form1();
ss.ShowDialog(this); //添加所在窗体引用
Form1中的代码 MainFrom s = this.Owner as MainForm;//获取并操作窗体
if (s!=null)
{
s.ToolStripMenuItem1.Visible = true;
}
Form1 ss=New Form1();
ss.ShowDialog(this); //添加所在窗体引用
Form1中的代码 MainFrom s = this.Owner as MainForm;//获取并操作窗体
if (s!=null)
{
s.ToolStripMenuItem1.Visible = true;
}
解决方案 »
- 为什么radioButton的checked属性赋值为true,页面中不选中
- MVC3中使用HttpPost方式无法进入路径
- 关于ListView的问题,谢谢
- 我要一个变量来动态备份DataGridView里某一列的内容,用string[]好像不能动态改变个数,用DataRow又好像没有构造函数,到底用什么好?
- DataSet中怎么查询指定条件的记录
- 请教:如何做到使PictureBox的图片背景"真正"透明?
- 如何在c#里运行一个以前做好的exe文件
- 最后30分请求高手帮助--无刷新二级下拉菜单
- 如何判断NetworkStream超时?
- 如何在C#中调用存储过程??
- c#中使用axwebbrowser控件,如何禁止点击右键弹出的菜单?
- 控制台程序的问题。
MainForm s = this.Owner as MainForm;
改为
MainForm s = this.MdiParent as MainForm;