110,502
社区成员
发帖
与我相关
我的任务
分享
else
{
Form frm = Application.OpenForms["Chart0"];
Chart0.Focus();
}
if (Form_lstMSchedule_g == null || Form_lstMSchedule_g.IsDisposed)
{
Form_lstMSchedule_g = new Form_lstMSchedule();
Form_lstMSchedule_g.MdiParent = this;
Form_lstMSchedule_g.Parent = CreateTabPage(tbCntrl_Main, tag, text);
Form_lstMSchedule_g.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
Form_lstMSchedule_g.WindowState = System.Windows.Forms.FormWindowState.Maximized;
Form_lstMSchedule_g.Show();
}
else
{
tbCntrl_Main.SelectedTab = ((TabPage)Form_lstMSchedule_g.Parent);
}
private bool checkChildFrmExist(string childFrmName)//参数窗体名称
{
foreach (Form childFrm in this.MdiChildren)
{
if (childFrm.Name == childFrmName)
{
if (childFrm.WindowState == FormWindowState.Minimized)
childFrm.WindowState = FormWindowState.Normal;
childFrm.Activate();
return true;
}
}
return false;
}
/// <summary>
/// 重绘新增窗体
/// </summary>
private void GetnewForm()
{
if (addcof != null)
{
if (addcof.IsDisposed)//如果已经销毁,则重新创建子窗口对象
{
addcof = new AddConsigneeForm();//此为你双击打开的FORM
addcof.Show();
addcof.Focus();
}
else
{
addcof.Show();
addcof.Focus();
}
}
else
{
addcof = new AddConsigneeForm();
addcof.Show();
addcof.Focus();
}
}
/// <summary>
/// 重绘新增窗体
/// </summary>
private void GetnewForm()
{
if (addcof != null)
{
if (addcof.IsDisposed)//如果已经销毁,则重新创建子窗口对象
{
addcof = new AddConsigneeForm();//此为你双击打开的FORM
addcof.Show();
addcof.Focus();
}
else
{
addcof.Show();
addcof.Focus();
}
}
else
{
addcof = new AddConsigneeForm();
addcof.Show();
addcof.Focus();
}
addcof.Show();
}
if (frm==null || frm.isdispose() )
{ frm=new form();
frm.show();
}
else
frm.active();