zoukankan      html  css  js  c++  java
  • 在主窗体中打开一个新子窗体,如果已有子窗体,则激活它,而不打开新的。

    frmGroupMgr fgm = null;

    //遍历窗体中是否已存在同名的子窗体

    foreach (Form f in this.MdiChildren)

                {

    //检测是不是当前子窗体名称

    if (f.Text == "组管理")

                    {

                        f.Activate();

                        fgm = f as frmGroupMgr;

    break;

                    }

                }

    //窗体中没有该子窗体 则打开一个新窗体

    if (fgm == null)

                {

                    fgm = new frmGroupMgr(this);

                    fgm.Show();

                }           

    //窗体最大化

                fgm.WindowState = FormWindowState.Maximized;

  • 相关阅读:
    Periodic Strings ( UVA
    Digit Counting ( UVA
    Molar mass ( UVA
    Score ( UVA
    Let the Balloon Rise (STL)
    Tree Recovery (STL)
    安卓simpleadapter问题
    安卓活跃手指问题
    python 问题记录
    设计模式笔记
  • 原文地址:https://www.cnblogs.com/zhcnblog/p/2573079.html
Copyright © 2011-2022 走看看