Control.OnPaintBackground(PaintEventArgs) 方法

定義

繪製控制項的背景。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,含有要繪製的控制項資訊。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).

適用於

另請參閱