ToolStrip.OnPaintBackground Method (PaintEventArgs)

 

Raises the Paint event for the ToolStrip background.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

protected override void OnPaintBackground(
	PaintEventArgs e
)

Parameters

e
Type: System.Windows.Forms.PaintEventArgs

A PaintEventArgs that contains information about the control to paint.

Raising an event invokes the event handler through a delegate. For more information, see Handling and Raising Events.

The OnPaintBackground method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

Notes to Inheritors:

Inheriting classes should override this method to handle the Windows request to erase the background.

.NET Framework
Available since 2.0
Return to top
Show: