How to Draw a Rectangle in VB.Net

Written by keith perry
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Draw a Rectangle in VB.Net
Rectangles are a common shape used in the graphic user interface of an application. (Hemera Technologies/ Images)

Users of software programs you code in Visual Basic interact with the graphical interface. The impression and understanding for the user is formed from the graphics that represent real world objects and actions. Rectangles are used to represent many objects, such as buildings and equipment. You can also use one or more rectangles to group objects. When using a rectangle in VB.Net, you can control the size, border and background colour to fit the needs of your application.

Skill level:
Moderately Easy


  1. 1

    Start the Visual Basic application from the list of applications available at the "Start" icon, which is located on the Windows taskbar.

  2. 2

    Press the "Control" and "N" keys concurrently to open a new VB.Net project. Select the "Windows Forms Application" option, and then click the "OK" button.

  3. 3

    Double-click the "RectangleShape" icon located in the "Tool Box" window pane under the "Visual Basic PowerPacks" category. This will display a rectangle control in "Form1."

  4. 4

    Click on the rectangle icon, and drag the rectangle to the position desired in the "Form1" window.

  5. 5

    Press the "F5" key to start the application in the debug execution mode, displaying the rectangle shape in "Form1."

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.