积极答复者
MDI子窗体中点击其按钮,打开已被隐藏的子窗体怎么写?

问题
答案
-
你好
我写了一个简单的方法。不过应该还有别的方法。
public partial class A : Form { public A() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { MdiMain main = this.ParentForm as MdiMain; Form[] forms = main.MdiChildren; foreach (Form f in forms) { if (f.Text.Equals("B")) { f.Show(); } } this.Close(); } }
Cookie Luo[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 囚徒 2011年4月27日 11:56
全部回复
-
你好
我写了一个简单的方法。不过应该还有别的方法。
public partial class A : Form { public A() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { MdiMain main = this.ParentForm as MdiMain; Form[] forms = main.MdiChildren; foreach (Form f in forms) { if (f.Text.Equals("B")) { f.Show(); } } this.Close(); } }
Cookie Luo[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 囚徒 2011年4月27日 11:56