19
Answers

Disable MaximizeBox and MinimizeBox for MDI Child Form

eddom

eddom

13y
12.3k
1
I can't disable the maximize and minimize box without setting ControlBox = False when the child form is maximized, anyone know the workaround for this?

I have set the mdi child form property as below:

FormBorderStyle = FixedSingle
ControlBox = True
MaximizeBox = False
MinimizeBox = False
WindowState = Maximized

I am able to fix this by doing the following:

ChildForm.WindowState = Normal;
ChildForm.MDIParent = this;
ChildForm.Show();
ChildForm.WindowState = Maximized;

what happen was, when I open 2nd child form, the minimized box enabled again....
Answers (19)