Disable maximize / minimize on Form's double click [duplicate]


Possible Duplicate:
How can I stop a double click of the window title bar from maximizing a window of FormBorderStyle.FixedToolWindow?

I have a form which I've removed the minimize and maximize buttons from, set the FormBorderStyle to none, added drag & drop behaviour, but I want my form size to be static. Now form maximizes/minimizes on Double Click.

I searched but didn't find relevent answers, questions I came up with were about disabling minimize & maximize buttons.

I there a way that I tell my form "Hei, would you ignore double click and maintain your size please?" ?


Answers:


You can set the MaximumSize and MinimumSize. If they both equal the same thing it should prevent the form from changing size.