Propriedade SimpleShape.Height

Obtém ou define a altura da forma.

Namespace:  Microsoft.VisualBasic.PowerPacks
Assembly:  Microsoft.VisualBasic.PowerPacks.Vs (em Microsoft.VisualBasic.PowerPacks.Vs.dll)

Sintaxe

'Declaração
<BrowsableAttribute(False)> _
Public Property Height As Integer
[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)

Valor de propriedade

Tipo: System.Int32
A altura da forma em pixels.

Comentários

As alterações feitas a Height e Top valores de propriedade causa o Bottom da forma para alterar o valor da propriedade.

Você pode usar o Size propriedade para alterar o Height e o Width propriedades ou use o SetBounds método para alterar o tamanho de uma forma e o local em uma única instrução.

Exemplos

O exemplo a seguir mostra como usar o Height e Width propriedades para alterar o tamanho de uma forma.Este exemplo requer que você tenha um OvalShape controle denominado OvalShape1 em um formulário.

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;
}

Segurança do .NET Framework

Consulte também

Referência

SimpleShape Classe

Namespace Microsoft.VisualBasic.PowerPacks

Outros recursos

Introdução à linha e controles Shape (Visual Studio)

Como: desenhar linhas com o controle de LineShape (Visual Studio)

Como: desenhar formas com os controles de RectangleShape (Visual Studio) e o OvalShape