Size Oluşturucular
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Aşırı Yüklemeler
| Name | Description |
|---|---|
| Size(Point) |
Belirtilen Size yapıdan yapının yeni bir örneğini Point başlatır. |
| Size(Int32, Int32) |
Belirtilen boyutlardan Size yapının yeni bir örneğini başlatır. |
Size(Int32, Int32)
- Kaynak:
- Size.cs
- Kaynak:
- Size.cs
- Kaynak:
- Size.cs
- Kaynak:
- Size.cs
- Kaynak:
- Size.cs
Belirtilen boyutlardan Size yapının yeni bir örneğini başlatır.
public:
Size(int width, int height);
public Size(int width, int height);
new System.Drawing.Size : int * int -> System.Drawing.Size
Public Sub New (width As Integer, height As Integer)
Parametreler
Örnekler
Aşağıdaki kod örneği, ve Point.Point oluşturucularının ve numaralandırmasının Size nasıl kullanılacağını System.Drawing.ContentAlignment gösterir. Bu örneği çalıştırmak için, bu kodu Label1 adlı etiketi içeren bir Windows Formuna yapıştırın ve formun oluşturucusunda InitializeLabel1 yöntemini çağırın.
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.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";
}
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