Click to See Complete Forum and Search --> : Form containing only 'X' and not '_' or '□' in titlebar


Jef Patat
August 30th, 2006, 03:45 AM
Hi all,

I would like to create a search form. That's not too difficult but I would like it to be as in other windows applications, where in the titlebar you can only close the searchform, not minimize or maximize.

How can I do this?

Kind regards,

Jef

klintan
August 30th, 2006, 04:03 AM
Set MaximizeBox and MinimizeBox properties of form to false.

Jef Patat
August 30th, 2006, 04:12 AM
:blush:
I feel ashamed for asking such a stupid question. I just did not see the anser. Thanks
:D

creatorul
August 30th, 2006, 04:20 AM
RightClick on the form and select Properties . In the bottom of the properties window you will find MaximizeBox and MinimizeBox . If you can't find them then select Form1.Designer.cs right-click and select View Code .
In the private void InitializeComponent() function write these lines :

this.MaximizeBox = false;

this.MinimizeBox = false;