Resize WinForms UserControl

folks, I've developed user control on WinForms, that consists of 2 textBoxes and 1 button between.When i add this control to the form and try to resize it(in general i need to resize only width), textboxes and button are not resized and staied on their place, but resized only form(User control) on which this controls are placed. How can i get this controls resized proportional to the form size(form on which these controls are placed) ?


The controls have a Anchor property which determines how they resize. If you anchor the controls to the top, left, right and bottom, then as you resize the form it will resize the controls

If you want to only resize the width, then dock to top, left and right.

Play about with it and it will soon make sense

链接地址: http://www.djcxy.com/p/61994.html

上一篇: 在输入/复制到富文本框时防止闪烁

下一篇: 调整WinForms UserControl的大小