次の方法で共有


SimpleShape.Height プロパティ

形状の高さを取得または設定します。

名前空間:  Microsoft.VisualBasic.PowerPacks
アセンブリ:  Microsoft.VisualBasic.PowerPacks.Vs (Microsoft.VisualBasic.PowerPacks.Vs.dll 内)

構文

'宣言
<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)

プロパティ値

型 : Int32
形状の高さ (ピクセル単位)。

解説

加えられた変更、HeightとTopプロパティ値が原因、Bottomを変更する図形のプロパティの値です。

使用することができます、Size両方を変更するプロパティをHeight、Widthプロパティ、または使用する、SetBounds図形のサイズと 1 つのステートメント内の場所を変更するメソッド。

次の例を使用する方法を示しています。、HeightとWidth図形のサイズを変更するプロパティです。 この例では、 OvalShape OvalShape1 という名前のフォームにコントロールです。

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 セキュリティ

  • 直前の呼び出し元に対する完全な信頼。このメンバーは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

関連項目

SimpleShape クラス

Microsoft.VisualBasic.PowerPacks 名前空間

その他の技術情報

ライン コントロールとシェイプ コントロールの概要 (Visual Studio)

方法 : LineShape コントロールを使用して線を描画する (Visual Studio)

方法 : OvalShape コントロールおよび RectangleShape コントロールを使用して図形を描画する (Visual Studio)