How to disable MenuStrip MaximizeBox

Bor*_*kan 1 c# winforms

How can i disable the MaximizeBox of MenuStrip when isMidContaine = true of the main form. I want it to be disable not to hide ControlBox of the form as i read in some solutions.

    private void Show_Form_Click(object sender, EventArgs e)
    {
        Form1 f = new Form1();
        f.MdiParent = this;
        f.WindowState = FormWindowState.Maximized;
        f.Show();
    }
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明

duD*_*uDE 6

尝试这个:

private void Show_Form_Click(object sender, EventArgs e)
{
    Form1 f = new Form1();
    f.MdiParent = this;

    f.Show();

    // Disable maximize box
    f.MaximizeBox = false;
    f.WindowState = FormWindowState.Maximized;
}
Run Code Online (Sandbox Code Playgroud)