Size コンストラクタとは? わかりやすく解説

Size コンストラクタ (Point)


Size コンストラクタ (Int32, Int32)

指定大きさから Size クラス新しインスタンス初期化します。

名前空間: System.Drawing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

使用例使用例

System.Drawing.Point コンストラクタSize コンストラクタ、および System.Drawing.ContentAlignment 列挙体の使用方法を示すコード例次に示します。この例を実行するには、Label1 という名前のラベル配置されWindows フォームコード貼り付けフォームコンストラクタIntializeLabel1 メソッド呼び出します。

Private Sub InitializeLabel1()

    ' Set a border.
    Label1.BorderStyle = BorderStyle.FixedSingle

    ' Set the size, constructing a size from two integers.
    Label1.Size = New Size(100, 50)

    ' Set the location, constructing a point from a 32-bit integer
    ' (using hexadecimal).
    Label1.Location = New Point(&H280028)

    ' Set and align the text on the lower-right side of the label.
    Label1.TextAlign = ContentAlignment.BottomRight
    Label1.Text = "Bottom Right Alignment"
End Sub
private void InitializeLabel1()
{
    // Set a border.
    Label1.BorderStyle = BorderStyle.FixedSingle;

    // Set the size, constructing a size from two integers.
    Label1.Size = new Size(100, 50);

    // Set the location, constructing a point from a 32-bit integer
    // (using hexadecimal).
    Label1.Location = new Point(0x280028);

    // Set and align the text on the lower-right side of the label.
    Label1.TextAlign = ContentAlignment.BottomRight;
    Label1.Text = "Bottom Right Alignment";
}
void InitializeLabel1()
{
   // Set a border.
   Label1->BorderStyle = BorderStyle::FixedSingle;
   
   // Set the size, constructing a size from two integers.
   Label1->Size = System::Drawing::Size( 100, 50 );
   
   // Set the location, constructing a point from a 32-bit integer
   // (using hexadecimal).
   Label1->Location = Point(0x280028);
   
   // Set and align the text on the lower-right side of the label.
   Label1->TextAlign = ContentAlignment::BottomRight;
   Label1->Text = "Bottom Right Alignment";
}
private void Initializelabel1()
{
    // Set a border.
    label1.set_BorderStyle(BorderStyle.FixedSingle);

    // Set the size, constructing a size from two integers.
    label1.set_Size(new Size(100, 50));

    // Set the location, constructing a point from a 32-bit integer
    // (using hexadecimal).
    label1.set_Location(new Point(0x280028));

    // Set and align the text on the lower-right side of the label.
    label1.set_TextAlign(ContentAlignment.BottomRight);
    label1.set_Text("Bottom Right Alignment");
} //Initializelabel1
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Size コンストラクタ




英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「Size コンストラクタ」の関連用語

Size コンストラクタのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Size コンストラクタのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS