SimpleShape.Top Property
Visual Studio 2005
Gets or sets the distance, in pixels, between the top edge of the shape and the left edge of its container's client area.
Assembly: Microsoft.VisualBasic.PowerPacks (in Microsoft.VisualBasic.PowerPacks.dll)
The Top property value is equivalent to the y parameter of the Location property value of the shape.
Changes made to the Height and Top property values cause the Bottom property value of the shape to change.
You can use the Location property to change both the Left and the Top properties to change a shape's location in a single statement.
The following example shows how to use the Left and Top properties to change the location of a shape. This example requires that you have a RectangleShape control named RectangleShape1 on a form.
Private Sub RectangleShape1_Click_1(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles RectangleShape1.Click ' Set the left edge. RectangleShape1.Left = 10 ' Set the top edge. RectangleShape1.Top = 10 End Sub
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.