SimpleShape.Height Property
Gets or sets the height of the shape.
Namespace: Microsoft.VisualBasic.PowerPacks
Assembly: Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)
Syntax
'Declaração
<BrowsableAttribute(False)> _
Public Property Height As Integer
Get
Set
[BrowsableAttribute(false)]
public int Height { get; set; }
[BrowsableAttribute(false)]
public:
property int Height {
int get ();
void set (int value);
}
[<BrowsableAttribute(false)>]
member Height : int with get, set
function get Height () : int
function set Height (value : int)
Property Value
Type: System.Int32
The height of the shape in pixels.
Remarks
Changes made to the Height and Top property values cause the Bottom property value of the shape to change.
You can use the Size property to change both the Height and the Width properties, or use the SetBounds method to change a shape's size and location in a single statement.
Examples
The following example shows how to use the Height and Width properties to change the size of a shape. This example requires that you have an OvalShape control named OvalShape1 on a form.
Private Sub OvalShape1_Click() Handles OvalShape1.Click
' Set the height.
OvalShape1.Height = OvalShape1.Height + 50
' Set the width the same as the height to make it a circle.
OvalShape1.Width = OvalShape1.Height
End Sub
private void ovalShape1_Click(System.Object sender, System.EventArgs e)
{
// Set the height.
ovalShape1.Height = ovalShape1.Height + 50;
// Set the width the same as the height to make it a circle.
ovalShape1.Width = ovalShape1.Height;
}
.NET Framework Security
- 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.
See Also
Reference
Microsoft.VisualBasic.PowerPacks Namespace
Other Resources
Introduction to the Line and Shape Controls (Visual Studio)
How to: Draw Lines with the LineShape Control (Visual Studio)
How to: Draw Shapes with the OvalShape and RectangleShape Controls (Visual Studio)