Click here to Skip to main content
15,916,463 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
how to disable restore,minimize and maximize buttons of MDI Child forms in C# windows application?
can anyone pls help.
Updated 5-Aug-17 12:09pm

Set the form properties MinimizeBox and MaximizeBox to false.

Good luck!
Share this answer
rupalelink 9-Aug-10 7:59am    
thanks for your suggestions..i tried for it but it doesnt work..
do u have any other idea?
E.F. Nijboer 9-Aug-10 8:09am    
hmmm... a bit strange... have a look on the forms msdn pages about it:

Maybe the formborderstyle must be changed because it's not working with all of them.
rupalelink 9-Aug-10 8:21am    
Its working in simple form but when its a child form in MDI page then its not working..
try to resolve my problem pls.
E.F. Nijboer 9-Aug-10 8:50am    
Found something like this ( by the way but shouldn't be hard to translate though.
Me.FormBorderStyle =
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.ControlBox = False
Me.WindowState =
E.F. Nijboer 9-Aug-10 8:57am    
Or maybe you could also try it using api calls directly:
EnableMenuItem(ChildForm.Handle, SC_MAXIMIZE, MF_DISABLED);
In the form class's constructor, simply add the code:



You can use the below code while creating a new instance of form:

MyForm formObject = new MyForm();
Share this answer
Graeme_Grant 5-Aug-17 20:52pm    
Any reason that you are answering a 7-year-old question? Do you think that he is still waiting for an answer all these years later?

Please refrain from answering old tombstoned questions and instead focus your energy on answering questions that are current where people really need help!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900