你好:
参考以下MSDN文档:
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.setboundscore.aspx
可以通过重写SetBoundsCore方法来设置一个固定的长度和宽度,这样在设计时就可以防止其他使用该控件的开发人员调整控件大小:
protected override void SetBoundsCore(int x, int y,
int width, int height, BoundsSpecified specified)
{
// Set a fixed height and width for the control.
base.SetBoundsCore(x, y, 150, 75, specified);
}
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.