Control コンストラクター
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
Control クラスの新しいインスタンスを初期化します。
オーバーロード
| 名前 | 説明 |
|---|---|
| Control() |
既定の設定を使用して、 Control クラスの新しいインスタンスを初期化します。 |
| Control(String) |
特定のテキストを使用して、 Control クラスの新しいインスタンスを初期化します。 |
| Control(Control, String) |
特定のテキストを使用して、 Control クラスの新しいインスタンスを子コントロールとして初期化します。 |
| Control(String, Int32, Int32, Int32, Int32) |
特定のテキスト、サイズ、および場所を使用して、 Control クラスの新しいインスタンスを初期化します。 |
| Control(Control, String, Int32, Int32, Int32, Int32) |
特定のテキスト、サイズ、および場所を使用して、 Control クラスの新しいインスタンスを子コントロールとして初期化します。 |
Control()
- ソース:
- Control.cs
- ソース:
- Control.cs
- ソース:
- Control.cs
- ソース:
- Control.cs
- ソース:
- Control.cs
既定の設定を使用して、 Control クラスの新しいインスタンスを初期化します。
public:
Control();
public Control();
Public Sub New ()
注釈
Control クラスは、Windows フォーム アプリケーションで使用されるすべてのコントロールの基本クラスです。 このクラスは通常、クラスのインスタンスを作成するために使用されないため、通常、このコンストラクターは直接呼び出されず、代わりに派生クラスによって呼び出されます。
適用対象
Control(String)
- ソース:
- Control.cs
- ソース:
- Control.cs
- ソース:
- Control.cs
- ソース:
- Control.cs
- ソース:
- Control.cs
特定のテキストを使用して、 Control クラスの新しいインスタンスを初期化します。
public:
Control(System::String ^ text);
public Control(string text);
public Control(string? text);
new System.Windows.Forms.Control : string -> System.Windows.Forms.Control
Public Sub New (text As String)
パラメーター
- text
- String
コントロールによって表示されるテキスト。
注釈
Control クラスは、Windows フォーム アプリケーションで使用されるすべてのコントロールの基本クラスです。 このクラスは通常、クラスのインスタンスを作成するために使用されないため、通常、このコンストラクターは直接呼び出されず、代わりに派生クラスによって呼び出されます。
このバージョンの Control コンストラクターは、初期 Text プロパティ値を text パラメーター値に設定します。
適用対象
Control(Control, String)
- ソース:
- Control.cs
- ソース:
- Control.cs
- ソース:
- Control.cs
- ソース:
- Control.cs
- ソース:
- Control.cs
特定のテキストを使用して、 Control クラスの新しいインスタンスを子コントロールとして初期化します。
public:
Control(System::Windows::Forms::Control ^ parent, System::String ^ text);
public Control(System.Windows.Forms.Control parent, string text);
public Control(System.Windows.Forms.Control? parent, string? text);
new System.Windows.Forms.Control : System.Windows.Forms.Control * string -> System.Windows.Forms.Control
Public Sub New (parent As Control, text As String)
パラメーター
- text
- String
コントロールによって表示されるテキスト。
注釈
Control クラスは、Windows フォーム アプリケーションで使用されるすべてのコントロールの基本クラスです。 このクラスは通常、クラスのインスタンスを作成するために使用されないため、通常、このコンストラクターは直接呼び出されず、代わりに派生クラスによって呼び出されます。
このバージョンの Control コンストラクターは、初期 Text プロパティ値を text パラメーター値に設定します。 また、コンストラクターは、親コントロールの Control.ControlCollectionにコントロールを追加します。
適用対象
Control(String, Int32, Int32, Int32, Int32)
- ソース:
- Control.cs
- ソース:
- Control.cs
- ソース:
- Control.cs
- ソース:
- Control.cs
- ソース:
- Control.cs
特定のテキスト、サイズ、および場所を使用して、 Control クラスの新しいインスタンスを初期化します。
public:
Control(System::String ^ text, int left, int top, int width, int height);
public Control(string text, int left, int top, int width, int height);
public Control(string? text, int left, int top, int width, int height);
new System.Windows.Forms.Control : string * int * int * int * int -> System.Windows.Forms.Control
Public Sub New (text As String, left As Integer, top As Integer, width As Integer, height As Integer)
パラメーター
- text
- String
コントロールによって表示されるテキスト。
注釈
Control クラスは、Windows フォーム アプリケーションで使用されるすべてのコントロールの基本クラスです。 このクラスは通常、クラスのインスタンスを作成するために使用されないため、通常、このコンストラクターは直接呼び出されず、代わりに派生クラスによって呼び出されます。
このバージョンの Control コンストラクターは、初期 Text プロパティ値を text パラメーター値に設定します。 コントロールの初期 Size と Location は、 left、 top、 width 、および height パラメーター値によって決まります。
注
パフォーマンスを向上させるには、コンストラクターでコントロールのサイズを設定しないでください。 DefaultSize プロパティをオーバーライドすることをお勧めします。
適用対象
Control(Control, String, Int32, Int32, Int32, Int32)
- ソース:
- Control.cs
- ソース:
- Control.cs
- ソース:
- Control.cs
- ソース:
- Control.cs
- ソース:
- Control.cs
特定のテキスト、サイズ、および場所を使用して、 Control クラスの新しいインスタンスを子コントロールとして初期化します。
public:
Control(System::Windows::Forms::Control ^ parent, System::String ^ text, int left, int top, int width, int height);
public Control(System.Windows.Forms.Control parent, string text, int left, int top, int width, int height);
public Control(System.Windows.Forms.Control? parent, string? text, int left, int top, int width, int height);
new System.Windows.Forms.Control : System.Windows.Forms.Control * string * int * int * int * int -> System.Windows.Forms.Control
Public Sub New (parent As Control, text As String, left As Integer, top As Integer, width As Integer, height As Integer)
パラメーター
- text
- String
コントロールによって表示されるテキスト。
注釈
Control クラスは、Windows フォーム アプリケーションで使用されるすべてのコントロールの基本クラスです。 このクラスは通常、クラスのインスタンスを作成するために使用されないため、通常、このコンストラクターは直接呼び出されず、代わりに派生クラスによって呼び出されます。
このバージョンの Control コンストラクターは、初期 Text プロパティ値を text パラメーター値に設定します。 また、コンストラクターは、親コントロールの Control.ControlCollectionにコントロールを追加します。 コントロールの初期 Size と Location は、 left、 top、 width 、および height パラメーター値によって決まります。
注
パフォーマンスを向上させるには、コンストラクターでコントロールのサイズを設定しないでください。 DefaultSize プロパティをオーバーライドすることをお勧めします。