ARTICLE
Resize a Form programmatically using VB.NET
Define the size of a form at run time by setting the Size property of the form. The following example shows the form size set to 220 by 100 pixels.
Define the size of a form at run time by setting the Size property of the form. The following example shows the form size set to 220 by 100 pixels.
Private Form1.Size = New System.Drawing.Size(220, 100)
Once the Size object is defined, change either its Width or Height property by using Width and Height properties.
Private Form1.Width = 300
Private Form1.Height = 200
or
Change Width or Height by setting the Size property. As the following code shows, however, this approach is more cumbersome than simply setting Width or Height properties.
Private Form1.Size = New Size(300, Form1.Size.Height)