다음을 통해 공유


Control.OnCreateControl 메서드

CreateControl 이벤트를 발생시킵니다.

네임스페이스: System.Windows.Forms
어셈블리: System.Windows.Forms(system.windows.forms.dll)

구문

‘선언
Protected Overridable Sub OnCreateControl
‘사용 방법

Me.OnCreateControl
protected virtual void OnCreateControl ()
protected:
virtual void OnCreateControl ()
protected void OnCreateControl ()
protected function OnCreateControl ()

설명

OnCreateControl 메서드는 컨트롤이 처음 만들어질 때 호출됩니다.

또한 OnCreateControl 메서드를 사용하면 파생 클래스가 대리자를 연결하지 않고도 이벤트를 처리할 수 있습니다. 이는 파생 클래스에서 이벤트를 처리하는 기본 방법입니다.

상속자 참고 사항 파생 클래스에서 OnCreateControl을 재정의하는 경우 등록된 대리자가 이벤트를 받도록 기본 클래스의 OnCreateControl 메서드를 호출해야 합니다.

플랫폼

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

2.0, 1.1, 1.0에서 지원

참고 항목

참조

Control 클래스
Control 멤버
System.Windows.Forms 네임스페이스
CreateControl