zoukankan      html  css  js  c++  java
  • [控件]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;

    }

  • 相关阅读:
    Gym 101194L / UVALive 7908
    POJ 2259
    POJ 2559
    Gym 101194E / UVALive 7901
    Gym 101194D / UVALive 7900
    一种整数集上二分的正确写法
    日常训练记录
    Gym 101194C / UVALive 7899
    Gym 101194A / UVALive 7897
    HDU 5542
  • 原文地址:https://www.cnblogs.com/xinzhyu/p/1512426.html
Copyright © 2011-2022 走看看