SimpleShape.Height (Propiedad)
Obtiene o establece el alto de la forma.
Espacio de nombres: Microsoft.VisualBasic.PowerPacks
Ensamblado: Microsoft.VisualBasic.PowerPacks.Vs (en Microsoft.VisualBasic.PowerPacks.Vs.dll)
Sintaxis
'Declaración
<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 propiedad
Tipo: Int32
Alto de la forma en píxeles.
Comentarios
Los cambios realizados en el Height y Top valores de propiedad causa el Bottom valor de la propiedad de la forma de cambiar.
Puede utilizar el Size propiedad para cambiar tanto el Height y la Width propiedades o use la SetBounds método para cambiar el tamaño y la ubicación en una sola instrucción de una forma.
Ejemplos
En el ejemplo siguiente se muestra cómo utilizar el Height y Width propiedades para cambiar el tamaño de una forma. Este ejemplo requiere que haya un OvalShape control denominado OvalShape1 en un formulario.
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;
}
Seguridad de .NET Framework
- Plena confianza para el llamador inmediato. Un código de confianza parcial no puede utilizar este miembro. Para obtener más información, vea Utilizar bibliotecas de código que no es de plena confianza.
Vea también
Referencia
Microsoft.VisualBasic.PowerPacks (Espacio de nombres)
Otros recursos
Introducción a los controles de líneas y formas (Visual Studio)
Cómo: Dibujar líneas con el control LineShape (Visual Studio)
Cómo: Dibujar formas con los controles OvalShape y RectangleShape (Visual Studio)