Shape Property

See Also2NDYCKH                 Example159XKBE>Low

Applies To

Shape9JZFLA.

Description

Determines the appearance of a shape control.

Usage

[form.]shape.Shape[ = numericexpression ]

Setting

The Shape property settings are:

Setting             Description

 

0                     (Default) Rectangle

1                     Square

2                     Oval

3                     Circle

4                     Rounded Rectangle

5                     Rounded Square

 

Data Type

IntegerDOKXHY (Boolean)


See Also

Help:

BorderStyle Property43RNRL

 

Programmer's Guide:

Chapter 15, "Creating Graphics for Applications"


Shape Property Example

The example illustrates the six possible shapes of the shape control.  To try this example, paste the code into the Declarations section of a form that contains an option button and a shape control.  On the option button, set Index to 0 to create a control array of one element.  Then press F5.  Click each option button to see each shape.

Sub Form_Load ()
  Dim I                               ' Declare variable.
  Option1(0).Caption = "Shape #0"
  For I = 1 To 5                      ' Create 5 instances of Option1.
    Load Option1(I)
    ' Set the location of the new option button.
    Option1(I).Top = Option1(I - 1).Top + Option1(0).Height + 40
    ' Set the option button caption,
    Option1(I).Caption = "Shape #" & I
    ' Display the new option button.
    Option1(I).Visible = True
  Next I
End Sub


Sub Option1_Click (Index As Integer)
  Shape1.Shape = Index
End Sub