HelloWorld1
HelloWorld1

Reputation: 14108

Remove the ability to resize

Goal: Don't want the user to make changes in the program's size.

Problem: Don't know how to remove that icone thing that allows user to resize the screen.

hello

Upvotes: 7

Views: 5329

Answers (3)

Manicguitarist
Manicguitarist

Reputation: 329

And don't forget to set ShowMinimize & Maximize to false as well (in addition to the form border style)

Upvotes: 0

Matteo Italia
Matteo Italia

Reputation: 126777

You should set the FormBorderStyle property of your form to a style that forbids resizing (any of the Fixedxxx styles will do).

Still, remember that, especially for main windows, often locking the size of the window is not a good choice in terms of program usability; resize logic is often boring and not easy to get right, but in general it's worth the effort (and the various Dock and Fill properties of the controls are there to help).

Upvotes: 11

brendan
brendan

Reputation: 29976

Set the FormBorderStyle to Fixed Single:

http://msdn.microsoft.com/en-us/library/hw8kes41%28v=vs.71%29.aspx

Upvotes: 2

Related Questions