Control.OnPrint(PaintEventArgs) 方法

定义

引发 Paint 事件。Raises the Paint event.

protected:
 virtual void OnPrint(System::Windows::Forms::PaintEventArgs ^ e);
protected virtual void OnPrint (System.Windows.Forms.PaintEventArgs e);
abstract member OnPrint : System.Windows.Forms.PaintEventArgs -> unit
override this.OnPrint : System.Windows.Forms.PaintEventArgs -> unit
Protected Overridable Sub OnPrint (e As PaintEventArgs)

参数

e
PaintEventArgs

包含事件数据的 PaintEventArgsA PaintEventArgs that contains the event data.

异常

e 参数为 nullThe e parameter is null.

注解

如果设置了 ControlStylesUserPaint 位,则可以重写 OnPrint 以执行分层绘制。If the UserPaint bit of the ControlStyles is set, you can override OnPrint to do layered painting. 有关更多信息,请参见SetStyleSee SetStyle for more information.

适用于

另请参阅