I have a situation where it would be beneficial to me to allow my windows form to be resized by the user, but only vertically. After some searching, it seems like there isn't much on this particular subject. Is it possible?
C# – Vertically Resizable Windows Form
c++resizewinforms
Best Answer
You need to set the form's
MinimumSize
andMaximumSize
properties to two sizes with different heights but equal widths.If you don't want the horizontal resize cursor to appear at all, you'll need to handle the
WM_NCHITTEST
message, like this: