gpt4 book ai didi

c# - 如何禁用 MenuStrip MaximizeBox

转载 作者:太空宇宙 更新时间:2023-11-03 18:51:09 25 4
gpt4 key购买 nike

当主窗体的 isMidContaine = true 时,如何禁用 MenuStripMaximizeBox。当我在某些解决方案中阅读时,我希望禁用它以不隐藏表单的 ControlBox

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

enter image description here

最佳答案

试试这个:

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;
}

关于c# - 如何禁用 MenuStrip MaximizeBox,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59069867/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com