首页上一页 1 下一页尾页 1 条记录 1/1页
子窗体显示问题
发表在C#图书答疑
2010-08-03
是否精华
是
否
版块置顶:
是
否
我在编写程序段中用到了子窗体,子窗体在事件调用中不能正常显示,这个问题是否与父窗体中用的panel控件有关。
Form2 frmChild1=null;
private void 退出ToolStripMenuItem_Click_1(object sender, EventArgs e)
{
this.Close();
}
private void 数据ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (frmChild1 == null)
{
frmChild1 = new Form2();
frmChild1.MdiParent = this;
this.frmChild1.TopMost = true;
frmChild1.Show();
}
else
{
if (frmChild1.IsDisposed)
{
frmChild1 = new Form2();
}
frmChild1.MdiParent = this;
frmChild1.Show();
frmChild1.Focus();
}
Form2 frmChild1=null;
private void 退出ToolStripMenuItem_Click_1(object sender, EventArgs e)
{
this.Close();
}
private void 数据ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (frmChild1 == null)
{
frmChild1 = new Form2();
frmChild1.MdiParent = this;
this.frmChild1.TopMost = true;
frmChild1.Show();
}
else
{
if (frmChild1.IsDisposed)
{
frmChild1 = new Form2();
}
frmChild1.MdiParent = this;
frmChild1.Show();
frmChild1.Focus();
}