views:

21

answers:

2

I have a dialog box which I programatically alter the height of. The problem now is that I'd like to allow the user to expand it horizontally if they want to see more information.

How can I stop the dialog from resizeing vertically if I allow the user to resize it?

+1  A: 

You can set MinimumSize to current size and MaximumSize to, well, maximum size, with height equal as in MinimumSize, and width=800 (or some other really big number).

Dialecticus
+1  A: 

Refer the following link for the same: http://stackoverflow.com/questions/2666788/winforms-how-to-prevent-vertically-resize-in-vb-net

Sandy
Excellent link :)
Hans Passant