[控件]DockPanel里如何在一个子窗体里打开另一个子窗体 显示在主窗体中? [控件]DockPanel里如何在一个子窗体里打开另一个子窗体 显示在主窗体中?DockPanel是个开源的控件期待高手回答 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 没用过 DockPanel 获取子窗体的Paint 看Form _Form = new Form();_Form.TopLevel = false;_Form.Paint = this.Parent;_Form.Show(); 如何在一个子窗体里打开另一个子窗体 显示在主窗体中? 这个问题好像和DockPanel没有关系的,只要你能把窗体显示到DockPanel中,然后就可以从这个窗体中打工你的子窗体了, 在主窗体里设置 public DockPanel DockPanel { get { return this.dockPanel; } }在要打开新子窗体的子窗体中设置 uiConfig uiCfig = new uiConfig(); if (((Main_frm)GetTopParent(this)).DockPanel.DocumentStyle == DocumentStyle.SystemMdi) { uiCfig.MdiParent = (Main_frm)GetTopParent(this); uiCfig.Show(); } else uiCfig.Show(((Main_frm)GetTopParent(this)).DockPanel); private Control GetTopParent(Control control) { while (control.Parent != null) { control = control.Parent; } return control; } C#怎么拆分WoRD C#中如何取得数组中相同元素的个数 用最快的方法 在ConsoleApplication里怎麼調整webService vs2005中gridview的编辑功能的问题,请各位高手帮忙看看~ 如何用c#做下面的题目 请问这个域名卖10万贵吗? 怎样使用C#访问系统的“传出队列”? 关于C#中Post方法传值的问题 我该怎么改变字体呢? 串口通信DataReceived的值怎么传出 不知道做法,欢迎大家来给我指点一下 有关checkedListBox1的操作(C/S)
Form _Form = new Form();
_Form.TopLevel = false;
_Form.Paint = this.Parent;
_Form.Show();
这个问题好像和DockPanel没有关系的,只要你能把窗体显示到DockPanel中,然后就可以从这个窗体中打工你的子窗体了,
public DockPanel DockPanel
{
get
{
return this.dockPanel;
}
}
在要打开新子窗体的子窗体中设置
uiConfig uiCfig = new uiConfig(); if (((Main_frm)GetTopParent(this)).DockPanel.DocumentStyle == DocumentStyle.SystemMdi)
{
uiCfig.MdiParent = (Main_frm)GetTopParent(this);
uiCfig.Show();
}
else
uiCfig.Show(((Main_frm)GetTopParent(this)).DockPanel);
private Control GetTopParent(Control control)
{
while (control.Parent != null)
{
control = control.Parent;
}
return control;
}