Reputation: 29
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();
}
Upvotes: 1
Views: 98
Reputation: 13984
Try this:
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;
}
Upvotes: 6