Control.OnPaintBackground 메서드

컨트롤의 배경을 그립니다.

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

구문

‘선언
Protected Overridable Sub OnPaintBackground ( _
    pevent As PaintEventArgs _
)
‘사용 방법
Dim pevent As PaintEventArgs

Me.OnPaintBackground(pevent)
protected virtual void OnPaintBackground (
    PaintEventArgs pevent
)
protected:
virtual void OnPaintBackground (
    PaintEventArgs^ pevent
)
protected void OnPaintBackground (
    PaintEventArgs pevent
)
protected function OnPaintBackground (
    pevent : PaintEventArgs
)

매개 변수

  • pevent
    칠하려는 컨트롤에 대한 정보가 들어 있는 PaintEventArgs입니다.

설명

OnPaintBackground 메서드를 사용하면 파생 클래스에서 Windows 배경 지우기 요청을 처리할 수 있습니다.

상속자 참고 사항 클래스를 상속하는 경우 이 메서드를 재정의하여 창의 배경 지우기 요청을 처리해야 합니다. 파생 클래스에서 OnPaintBackground를 재정의하는 경우 기본 클래스의 OnPaintBackground를 호출할 필요가 없습니다. 그러나 기본 Windows 동작을 사용하지 않으려면 이벤트의 Handled 속성을 true로 설정해야 합니다.

플랫폼

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에서 지원

.NET Compact Framework

2.0, 1.0에서 지원

참고 항목

참조

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