Control.OnPaintBackground(PaintEventArgs) Control.OnPaintBackground(PaintEventArgs) Control.OnPaintBackground(PaintEventArgs) Control.OnPaintBackground(PaintEventArgs) Method

定义

绘制控件的背景。Paints the background of the control.

protected:
 virtual void OnPaintBackground(System::Windows::Forms::PaintEventArgs ^ pevent);
protected virtual void OnPaintBackground (System.Windows.Forms.PaintEventArgs pevent);
abstract member OnPaintBackground : System.Windows.Forms.PaintEventArgs -> unit
override this.OnPaintBackground : System.Windows.Forms.PaintEventArgs -> unit
Protected Overridable Sub OnPaintBackground (pevent As PaintEventArgs)

参数

pevent
PaintEventArgs PaintEventArgs PaintEventArgs PaintEventArgs

一个 PaintEventArgs,其中包含有关要绘制的控件的信息。A PaintEventArgs that contains information about the control to paint.

注解

OnPaintBackground方法使派生类能够处理 Windows 后台清除请求。The OnPaintBackground method enables derived classes to handle Windows background erase requests.

继承者说明

继承类应重写此方法,以处理来自 windows 的擦除后台请求。Inheriting classes should override this method to handle the erase background request from windows. 当在OnPaintBackground(PaintEventArgs)派生类中重写时,无需调用基类的。 OnPaintBackground(PaintEventArgs)When overriding OnPaintBackground(PaintEventArgs) in a derived class it is not necessary to call the base class's OnPaintBackground(PaintEventArgs).

适用于

另请参阅