1.子窗体引用基类:WeifenLuo.WinFormsUI.Docking.DockContent
2.是否可关闭:CloseButton:true。false。
3.严禁窗口多开
#region 窗体间互访(子窗体)
private static 入群欢迎 m_Form = new 入群欢迎();
public static 入群欢迎 NewForm
{
get
{
if (m_Form == null || m_Form.IsDisposed)
{
m_Form = new 入群欢迎();
}
else
{
m_Form.Activate();
}
return m_Form;
}
}
4.主窗体引用方式
入群欢迎.NewForm.Show(dockPanel1, DockState.Document);