【问题标题】:How do I remove the layer of control box of the second(child) form within the MDI form as parent form in C#?c# - 如何将MDI窗体中的第二个(子)窗体的控制框层删除为C#中的父窗体?
【发布时间】:2020-05-30 04:22:29
【问题描述】:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

    namespace SchoolDemo
{
    public partial class MDI : Form
    {
        public MDI()
        {
            InitializeComponent();
        }

        private void MDI_Load(object sender, EventArgs e)
        {
            Demo naya = new Demo();
            {
                naya.MdiParent = this;
                naya.WindowState = FormWindowState.Maximized;
            };
            naya.Show();
        }
    }
}

[^这是我的 MDI 表单的代码]

In the right hand corner you can see there is a extra layer of max, min and close options. I have already disabled control box in child form but I am still getting this.

【问题讨论】:

    标签: c# visual-studio desktop-application


    【解决方案1】:

    根据你的描述,你想去掉child的控制框层

    表格。

    你可以试试下面的代码来解决这个问题。

    子表单代码:

      private void Demo_Load(object sender, EventArgs e)
            {
                ControlBox = false;
            }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-10-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多