我如何在MDI表单中删除第二个(子)表单的控制框层,作为C#中的父表单?

问题描述 投票:0回答:1
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个回答
0
投票

根据您的描述,您要删除孩子的控制盒层

表格。

您可以尝试以下代码来解决此问题。

子表格代码:

  private void Demo_Load(object sender, EventArgs e)
        {
            ControlBox = false;
        }
© www.soinside.com 2019 - 2024. All rights reserved.