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: Int32
A altura da forma em pixels.
Comentários
As alterações feitas a Height e Top valores de propriedade causa o Bottom valor da propriedade da forma para alterar.
Você pode usar o Size propriedade para alterar o Height e 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
- Confiança total para o chamador imediato. O membro não pode ser usado por código parcialmente confiável. Para obter mais informações, consulte Usando bibliotecas de código parcialmente confiável.
Consulte também
Referência
Namespace Microsoft.VisualBasic.PowerPacks
Outros recursos
Introdução aos controles de linha e forma (Visual Studio)
Como desenhar linhas com o controle LineShape (Visual Studio)
Como desenhar formas com os controles OvalShape e RectangleShape (Visual Studio)