简体   繁体   中英

How can i Remove Maximize,Minimize and Close icon in MDI Menustrip

iam using C#.Net Windows Application.In my project have different module that will be used by MDI.. now what the problem is,i can open a new form mean they will display maximize,minimize and Close icon in both MDI and Menustrip.See Below Image...

在此处输入图片说明

How can i remove child forms icons(Maximize,Minimize and Close) from MenuStrip

Thanks in Advance...

In winforms the area where those buttons are is called ControlBox if you do not want them to be displayed you should set the ControlBox property of the form to false

childForm.ControlBox = false;

But as pointed out in the comments you could use your forms as UserControls by just setting its TopLevel property to false

Form childForm = new Form()
childForm.TopLevel = false;
childForm.Parent = MainForm;
childForm.Show()

Doing that you can acomplish the same final result as an MDI form

I am sure this is solve for what you search

in first you should set all properties

formborderstyle = None
ControlBox = false
MaximizeBox = false
MinimizeBox = false
showicon = false

and DO NOT SET Windowstate = maximized

secondly when you create object from this form

form1 form= new Student();
form.MdiParent = this;
form.Dock = DockStyle.Fill;
form.Show();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM