如何在DockPanel 的子窗体打开另一子窗体使其停靠在主窗体
1个回答
展开全部
private Control GetTopParent(Control control){while (control.Parent != null){control = control.Parent;}return control;}3、如何在子窗体frmSysMenu里调用其他子窗体try{//使用反射object obj = Assembly.LoadFrom(strDllName + ".DLL").CreateInstance(strDllName.Substring(0, strDllName.Length - 3) + "." + strFrmName);
if (obj != null){if (((frmMain)GetTopParent(this)).DockPanel.DocumentStyle == DocumentStyle.SystemMdi){((DockContent)obj).MdiParent = (frmMain)GetTopParent(this);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询