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

<BrowsableAttribute(False)> _
Public Property Height As Integer

Dim instance As SimpleShape
Dim value As Integer

value = instance.Height

instance.Height = value
[BrowsableAttribute(false)]
public int Height { get; set; }
[BrowsableAttribute(false)]
public:
property int Height {
    int get ();
    void set (int value);
}
public function get Height () : int
public function set Height (value : int)

Valor de propriedade

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

Comentários

Alterações feitas a Height e Top propriedade valores causa a Bottom valor da propriedade da forma para alterar.

Você pode usar o Size propriedade para alterar tanto a Height e o Width propriedades ou use o SetBounds método para alterar o dimensionar da forma e o local em uma única demonstrativo.

Exemplos

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

PrivateSub OvalShape1_Click(ByVal sender As System.Object, _
 ByVal e As System.EventArgs) 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
EndSub
privatevoid 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;
}

Permissões

Consulte também

Referência

SimpleShape Classe

Membros SimpleShape

Namespace Microsoft.VisualBasic.PowerPacks

Outros recursos

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

Como: Desenhar linhas com o Controlarar de LineShape (Visual Studio)

Como: Desenhar formas com a OvalShape e controles de RectangleShape (Visual Studio)