Visual Basic



Project 2-1: Calculate area and perimeter form

For this project, you’ll create a form that accepts the length and width of a rectangle from the user. This is simply a design and does not need to fully function. It must be the following specifications.

The design of the Area And Perimeter form

· Pay attention to the alignment of the labels. (There are a total of 6 labels on this form. Know the difference between labels and text boxes.)

· Pay attention to the alignment of the contents of the text boxes.

· Only 7 objects need meaningful names (Form, both text boxes, 2 labels and both buttons). Make sure you use the one or three letter identifier in the names you choose for your objects. (Example: Form name is fAreaPerimeter or frmAreaPerimeter; tLength or txtLength for one textbox.)

· Make sure all the textboxes and labels are the same size, aligned with each other and are evenly spaced.

· Make sure the buttons are the same size and are aligned with each other.


· Set the solution name to AreaAndPerimeter.

· Give the form, textboxes, the two important labels, and the buttons meaningful names.

· Clear the TEXT properties of the textboxes and the labels that show the results.

· Use Area and Perimeter for the form’s TEXT property.

· Set “C” as the access key for the Calculate button and “x” as the access key for the Exit button.

· Set the form’s ACCEPTBUTTON property to the Calculate button object.

· Set the form’s CANCELBUTTON property to the Exit button object.

· Set the form’s STARTPOSITION property to center screen.

· Set the tab order so that focus is on the first textbox, then the second textbox, then the Calculate button, and finally the Exit button.


· To get the labels that display the area and perimeter to look like the ones shown above, you’ll need to set the AutoSize property of the labels to False and the BorderStyle property to Fixed3D.

  • 6 days ago
  • 50

Purchase the answer to view it

  • attachment