Control.OnPrint(PaintEventArgs) Control.OnPrint(PaintEventArgs) Control.OnPrint(PaintEventArgs) Control.OnPrint(PaintEventArgs) Method

定义

引发 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 PaintEventArgs PaintEventArgs PaintEventArgs

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

异常

注解

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

适用于

另请参阅