Change form size at runtime in C#

前端 未结 6 1731
傲寒
傲寒 2021-01-01 19:32

How can I change window form size at runtime?

I saw examples, but every one requires Form.Size property. This property can be set like here: http://msdn.microsoft.co

6条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-01 19:54

    You can change the height of a form by doing the following where you want to change the size (substitute '10' for your size):

    this.Height = 10;
    

    This can be done with the width as well:

    this.Width = 10;
    

提交回复
热议问题