4
Reply

Remove maximize,minimize and control box in MDI child form

Rani

Rani

Jan 18 2013 1:48 PM
6k
How to remove the maximize box,minimize box and control box in the mdi child form???

I have done the following,

used Menustrip in MDIParent form and as selection of the menu item the mdi child form should be displayed within the parent form.

In menustripitem i have coded as,

if (F2 == null || F2.IsDisposed|| F2.IsMdiChild )
{
F2 = new Form2();
F2.MdiParent = this;
F2.ShowIcon = false;
F2.Dock =DockStyle .Fill ;
F2.Show();

}


In the child form load event i have set the following properties,

this.FormBorderStyle = FormBorderStyle.None;
this.ControlBox = false;
this.MaximizeBox = false;
this.MinimizeBox = false;

But,eventhough the maximize box,minimize box and control box are appearing a second and disappears.why it is displaying like that,whether the maximize box,minimize box and control box are removed or not.

Can anyone provide the suggestion...???



Answers (4)