It is possible to drag a Forms width.

What I want is to prevent a user to drag the Forms width more than the value 405.
I have tried out with the code below but nothing happens when I drag the width of the form. Thanks!

private: System::Void Form1_SizeChanged(System::Object^  sender, System::EventArgs^  e) 
				 if( Form1::Width > 405 )
					 Form1::Width == 405;

Try changing the MaximumSize property of the Form1

Thanks jonsca, I didn´t know that was possible.

It worked out perfectly. Thank you!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.