-1

Screenshot

I want to disable Minimize and Maximize buttons of child form. There should be only close button.

Note : I disable Maximize and minimize buttons from property window. But I didn't work.

stuartd
  • 70,509
  • 14
  • 132
  • 163
Emre Kadan
  • 41
  • 3
  • 10

1 Answers1

1

Try this

var f = new Form();
f.MinimizeBox = false;
f.MaximizeBox = false;
f.Show();
tym32167
  • 4,741
  • 2
  • 28
  • 32
  • 1
    Or simply this.MinimizeBox = false and this.MaximizeBox = false in the constructor of the form. – JohnSaps Sep 16 '16 at 09:23
  • @JohnSaps form does not have constructor with parameters https://msdn.microsoft.com/en-us/library/system.windows.forms.form%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396 . Maybe you mean object initializer? So, its the same. – tym32167 Sep 16 '16 at 09:34