设置datagridview的dock属性,或者Anchor属性。推荐使用Anchor属性 转载于:https://www.cnblogs.com/haimingkaifa/p/5529803.html