Winforms: How to prevent vertically resize in VB.NET

Posted by ajtp on Stack Overflow See other posts from Stack Overflow or by ajtp
Published on 2010-04-19T11:00:01Z Indexed on 2010/04/19 11:03 UTC
Read the original article Hit count: 685

Filed under:
|
|
|

Hi,

Working with winforms I wonder if there is some way to prevent vertically resize of the form. I would like to allow user to resize form in all directions except vertically.Moreover I would like to allow vertically resize in upward direction, but not downward.

I have tried to use maximumsize by setting it to: Me.maximumsize = new size(0,me.height)

I set width to 0 because I want to allow user to change form width.

Unfortunately it doesn't work.

Any ideas?

© Stack Overflow or respective owner

Related posts about winforms

Related posts about resize