Control.OnPaintBackground(PaintEventArgs) 方法

定義

繪製控制項的背景。

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

備註

方法 OnPaintBackground 可讓衍生類別處理 Windows 背景清除要求。

給繼承者的注意事項

繼承類別應該覆寫這個方法,以處理來自視窗的清除背景要求。 在 OnPaintBackground(PaintEventArgs) 衍生類別中覆寫時,不需要呼叫基類的 OnPaintBackground(PaintEventArgs)

適用於

另請參閱