---A
---B
---C
选中节点A,弹出FORM1
选中节点B,弹出FORM2
选中节点C,弹出FORM3
三个窗体都在父窗体中打开,当我选中节点A时,如何使FORM1最前??
private void treeView1_Click(object sender, EventArgs e)
{
if (treeView1.SelectedNode.Text == "硬包核价录入")
{
if (f1 == null || fst.IsDisposed)
{
f1 = new Form1();
f1.MdiParent = this;
f1.Show();
}
else
{
f1.Activate();
}
}
if (treeView1.SelectedNode.Text == "硬包核价参数")
{
if (fst == null || fst.IsDisposed)
{
fst = new FrmSelect();
fst.MdiParent = this;
fst.Show();
}
else
{
fst.Activate();
}
}
}
也没达到效果