Control.OnPaintBackground(PaintEventArgs) 方法
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
繪製控制項的背景。
protected:
virtual void OnPaintBackground(System::Windows::Forms::PaintEventArgs ^ pevent);
C#
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) 。
產品 | 版本 |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 |
Windows Desktop | 3.0, 3.1, 5, 6, 7 |