Control.OnPaintBackground(PaintEventArgs) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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)
Parameters
- pevent
- PaintEventArgs
A PaintEventArgs that contains information about the control to paint.
Remarks
The OnPaintBackground method enables derived classes to handle Windows background erase requests.
Notes to Inheritors
Inheriting classes should override this method to handle the erase background request from windows. When overriding OnPaintBackground(PaintEventArgs) in a derived class it is not necessary to call the base class's OnPaintBackground(PaintEventArgs).