form with vertical sizing only

  • Thread starter Thread starter blah blah blah
  • Start date Start date
B

blah blah blah

I'm trying to make a form that can be sized vertically but not
horizontally. Any pointers?


First attempt was to
set the form's FormBorderStyle = Sizeable
set the form's MaximumSize.Width to the fixed width

Unfortunately, the users still sees these cursors, SizeNESW, SizeNWSE,
and SizeWE. Also, they can size the form vertically by grabbing one
of the East/West borders near the North/South edge. I'd prefer to not
have that behavior, only the North/South borders should actually size
the form.
 
Set the width somewhere within the resize event. Then if someone does resize
it horizontally, it'll instantly spring back to your desired width. That
said, an application with this behaviour would prove very annoying and many
people would uninstall it.
 
Bonj said:
Set the width somewhere within the resize event. Then if someone does resize
it horizontally, it'll instantly spring back to your desired width. That
said, an application with this behaviour would prove very annoying and many
people would uninstall it.

I'm the original poster.

I do not have the problem you mentioned because (oops I should have written
this in my original post) I also set MinimumSize.Width to the fixed width.
 
Back
Top