Objectives:

  • Use Visual Basic to Make Shapes
  • Add Forms to Your Main Form

Using Graphics to Spice Up Your Forms



The first part of this tutorial shows you how to add shapes to your Visual Basic Projects.

  1. Add a new form to your master project (from last assignment).

  2. Name your form frmShapes.

  3. Click the shapes icon on the Visual Basic Toolbox.

  4. Click and drag a shape on your form.

  5. Notice that the shape starts as a rectangle.

  6. Observe the "shape" properties for your rectangle:



  7. Click on the arrow and select rounded rectangle.

  8. Notice how the shape automatically changes.

  9. Try the other shape properties.

  10. Change the BackStyle property to Opaque.

  11. Change the BackColor property to a new color.

  12. Change the FillStyle property to Vertical Line.

  13. Change the BorderWidth property to 4.

  14. Change the shape's BackStyle property to transparent.

  15. Add a total of ten shapes to your form, frmShapes.Each should have its own BackColor, FillStyle, and BorderWidth.

  16. Link the form to your master project. Call the link shapes.



<< Back to Skyline