zoukankan      html  css  js  c++  java
  • c# 子窗体打开或者切换就最大化

    “用MDI方式打开一个子窗口体后,总是不能最大化显示,明明子窗口体的WindowState设置为Maximized?”,相信有很多人会遇到这的样问题,请按下面的方法设置即可使MDI子窗体最大化:
    1、把父窗体的IsMdiContainer设置为True;
    2、把子窗体的WindowState设置为Normal;
    3、在父窗体中用下面的方法打开子窗体

    private void testToolStripMenuItem_Click(object sender, EventArgs e)

            {
                // 关闭活动的子窗体
                Form activeChild = this.ActiveMdiChild;
                while (activeChild != null)
                {
                    activeChild.Close();
                    activeChild = this.ActiveMdiChild;
                }
                // 打开新的子窗体
                Forggg test = new Forggg();
                test.MdiParent = this;
                test.WindowState = FormWindowState.Maximized;
                test.Show();

                // 或者打开新的子窗体

               frmDiYaSystemDiagram = FrmSystemDiagramLow.Instince();
               frmDiYaSystemDiagram.MdiParent = this;
               frmDiYaSystemDiagram.WindowState = FormWindowState.Maximized;
               frmDiYaSystemDiagram.Show();

            }

  • 相关阅读:
    OSCP Learning Notes Buffer Overflows(3)
    OSCP Learning Notes Buffer Overflows(5)
    OSCP Learning Notes Exploit(3)
    OSCP Learning Notes Exploit(4)
    OSCP Learning Notes Exploit(1)
    OSCP Learning Notes Netcat
    OSCP Learning Notes Buffer Overflows(4)
    OSCP Learning Notes Buffer Overflows(1)
    OSCP Learning Notes Exploit(2)
    C++格式化输出 Learner
  • 原文地址:https://www.cnblogs.com/baoku/p/9492958.html
Copyright © 2011-2022 走看看