mdi窗体中,如果一子窗体已打开,点击按钮显示该窗体到最前会有明显的放大过程,闪眼睛,哪们高手有办法能作到像按ctrl+tab键切换窗体那样不会闪的效果呀?Form2 frmChild1 = null;
Form3 frmChild2 = null;
private void 打开子窗体一ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (frmChild1 == null)
{
frmChild1 = new Form2();
frmChild1.MdiParent = this;
frmChild1.Show();
}
else
{
if (frmChild1.IsDisposed)
{
frmChild1 = new Form2();
}
frmChild1.MdiParent = this;
frmChild1.Show();
frmChild1.Focus();
}
}
Form3 frmChild2 = null;
private void 打开子窗体一ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (frmChild1 == null)
{
frmChild1 = new Form2();
frmChild1.MdiParent = this;
frmChild1.Show();
}
else
{
if (frmChild1.IsDisposed)
{
frmChild1 = new Form2();
}
frmChild1.MdiParent = this;
frmChild1.Show();
frmChild1.Focus();
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货