resize form VB.NET

In VB.NET you can resize a form by setting Size property of the form or by using the Size property of the form from VB code. The Size property accepts a size object in which width and height of the form are defined.

FormObject.Size = New Size(Width, Height)
Example:

 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
      Me.Size = New Size(200, 100)

End Sub

If you want to open the from in a full screen window, you will need to set the WindowState as shown below:

 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
   WindowState = FormWindowState.Maximized

End Sub

Posted by: Eng | post date: 12-10-2012 | Subject: VB.NET Programming Language




This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages:
C, C++, C#, Java, VB.NET, Python, VBA,PHP & Mysql, SQL, JSP, ASP.NET,HTML, CSS, JQuery, JavaScript and other applications such as MS Excel, MS Access, and MS Word. However, we don't guarantee all things of the web are accurate. If you find any error, please report it then we will take actions to correct it as soon as possible.