eddom

eddom

  • NA
  • 17
  • 0

Disable MaximizeBox and MinimizeBox for MDI Child Form

Mar 30 2011 6:27 AM
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)