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
As a complement to the answers given above; do not forget about Form MinimumSize Property, in case you require to create smaller Forms.
Example Bellow:
private void SetDefaultWindowSize()
{
int sizeW, sizeH;
sizeW = 180;
sizeH = 100;
var size = new Size(sizeW, sizeH);
Size = size;
MinimumSize = size;
}
private void SetNewSize()
{
Size = new Size(Width, 10);
}