How to resize the control in runtime:C#-Collection of common programming errors

Hi Pavithra.Abbineni

Please also make sure that Control.AutoSize property has been set to false before setting new Size. If “true”, it will not resize itself.

Furthermore, some controls like TextBox has not AutoSize property, thus cannot be resized as you wish. Only width of TextBox can be reset successfully.

For more information of specific control’s AutoSize property, please refer to its MSDN document.

Thanks.

Best wishes

Jun Wang