开发者

Remove the ability to resize

开发者 https://www.devze.com 2023-02-11 08:46 出处:网络
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 resiz开发者_StackOverflow中文版e the screen.

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 resiz开发者_StackOverflow中文版e the screen.

Remove the ability to resize


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).


Set the FormBorderStyle to Fixed Single:

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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号