다음을 통해 공유


Control 생성자

정의

Control 클래스의 새 인스턴스를 초기화합니다.

오버로드

Name Description
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()

Source:
Control.cs
Source:
Control.cs
Source:
Control.cs
Source:
Control.cs
Source:
Control.cs

기본 설정을 사용하여 클래스의 새 인스턴스를 Control 초기화합니다.

public:
 Control();
public Control();
Public Sub New ()

설명

Control 클래스는 Windows Forms 애플리케이션에서 사용되는 모든 컨트롤의 기본 클래스입니다. 이 클래스는 일반적으로 클래스의 인스턴스를 만드는 데 사용되지 않으므로 이 생성자는 일반적으로 직접 호출되지 않고 파생 클래스에서 호출됩니다.

적용 대상

Control(String)

Source:
Control.cs
Source:
Control.cs
Source:
Control.cs
Source:
Control.cs
Source:
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 Forms 애플리케이션에서 사용되는 모든 컨트롤의 기본 클래스입니다. 이 클래스는 일반적으로 클래스의 인스턴스를 만드는 데 사용되지 않으므로 이 생성자는 일반적으로 직접 호출되지 않고 파생 클래스에서 호출됩니다.

이 버전의 Control 생성자는 초기 Text 속성 값을 매개 변수 값으로 text 설정합니다.

적용 대상

Control(Control, String)

Source:
Control.cs
Source:
Control.cs
Source:
Control.cs
Source:
Control.cs
Source:
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)

매개 변수

parent
Control

Control 컨트롤의 부모가 될 수 있습니다.

text
String

컨트롤에서 표시하는 텍스트입니다.

설명

Control 클래스는 Windows Forms 애플리케이션에서 사용되는 모든 컨트롤의 기본 클래스입니다. 이 클래스는 일반적으로 클래스의 인스턴스를 만드는 데 사용되지 않으므로 이 생성자는 일반적으로 직접 호출되지 않고 파생 클래스에서 호출됩니다.

이 버전의 Control 생성자는 초기 Text 속성 값을 매개 변수 값으로 text 설정합니다. 또한 생성자는 부모 컨트롤의 컨트롤에 컨트롤 Control.ControlCollection을 추가합니다.

적용 대상

Control(String, Int32, Int32, Int32, Int32)

Source:
Control.cs
Source:
Control.cs
Source:
Control.cs
Source:
Control.cs
Source:
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

컨트롤에서 표시하는 텍스트입니다.

left
Int32

X 컨트롤 컨테이너의 왼쪽 가장자리에서 컨트롤의 위치(픽셀)입니다. 값이 속성에 Left 할당됩니다.

top
Int32

Y 컨트롤 컨테이너의 위쪽 가장자리에서 컨트롤의 위치(픽셀)입니다. 값이 속성에 Top 할당됩니다.

width
Int32

컨트롤의 너비(픽셀)입니다. 값이 속성에 Width 할당됩니다.

height
Int32

컨트롤의 높이(픽셀)입니다. 값이 속성에 Height 할당됩니다.

설명

Control 클래스는 Windows Forms 애플리케이션에서 사용되는 모든 컨트롤의 기본 클래스입니다. 이 클래스는 일반적으로 클래스의 인스턴스를 만드는 데 사용되지 않으므로 이 생성자는 일반적으로 직접 호출되지 않고 파생 클래스에서 호출됩니다.

이 버전의 Control 생성자는 초기 Text 속성 값을 매개 변수 값으로 text 설정합니다. 컨트롤의 초기 Size 값과 Location 컨트롤은 , widthtopheight 매개 변수 값에 의해 left결정됩니다.

메모

성능을 향상시키려면 해당 생성자에서 컨트롤의 크기를 설정하지 마세요. 기본 설정 방법은 속성을 재정의하는 것입니다 DefaultSize .

적용 대상

Control(Control, String, Int32, Int32, Int32, Int32)

Source:
Control.cs
Source:
Control.cs
Source:
Control.cs
Source:
Control.cs
Source:
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)

매개 변수

parent
Control

Control 컨트롤의 부모가 될 수 있습니다.

text
String

컨트롤에서 표시하는 텍스트입니다.

left
Int32

X 컨트롤 컨테이너의 왼쪽 가장자리에서 컨트롤의 위치(픽셀)입니다. 값이 속성에 Left 할당됩니다.

top
Int32

Y 컨트롤 컨테이너의 위쪽 가장자리에서 컨트롤의 위치(픽셀)입니다. 값이 속성에 Top 할당됩니다.

width
Int32

컨트롤의 너비(픽셀)입니다. 값이 속성에 Width 할당됩니다.

height
Int32

컨트롤의 높이(픽셀)입니다. 값이 속성에 Height 할당됩니다.

설명

Control 클래스는 Windows Forms 애플리케이션에서 사용되는 모든 컨트롤의 기본 클래스입니다. 이 클래스는 일반적으로 클래스의 인스턴스를 만드는 데 사용되지 않으므로 이 생성자는 일반적으로 직접 호출되지 않고 파생 클래스에서 호출됩니다.

이 버전의 Control 생성자는 초기 Text 속성 값을 매개 변수 값으로 text 설정합니다. 또한 생성자는 부모 컨트롤의 컨트롤에 컨트롤 Control.ControlCollection을 추가합니다. 컨트롤의 초기 Size 값과 Location 컨트롤은 , widthtopheight 매개 변수 값에 의해 left결정됩니다.

메모

성능을 향상시키려면 해당 생성자에서 컨트롤의 크기를 설정하지 마세요. 기본 설정 방법은 속성을 재정의하는 것입니다 DefaultSize .

적용 대상