ToolStrip.OnPaintBackground(PaintEventArgs) ToolStrip.OnPaintBackground(PaintEventArgs) ToolStrip.OnPaintBackground(PaintEventArgs) ToolStrip.OnPaintBackground(PaintEventArgs) Method

定义

Paint 背景引发 ToolStrip 事件。Raises the Paint event for the ToolStrip background.

protected:
 override void OnPaintBackground(System::Windows::Forms::PaintEventArgs ^ e);
protected override void OnPaintBackground (System.Windows.Forms.PaintEventArgs e);
override this.OnPaintBackground : System.Windows.Forms.PaintEventArgs -> unit
Protected Overrides Sub OnPaintBackground (e As PaintEventArgs)

参数

e
PaintEventArgs PaintEventArgs PaintEventArgs PaintEventArgs

一个 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.

OnPaintBackground 方法还允许派生类对事件进行处理而不必附加委托。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.

继承者说明

继承类应重写此方法以处理 Windows 请求要清除背景。Inheriting classes should override this method to handle the Windows request to erase the background.

适用于