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

PaintEventArgs,其中包含事件資料。A PaintEventArgs that contains the event data.

例外狀況

備註

如果UserPaint位元ControlStyles設定,您可以覆寫OnPrint進行多層的繪製。If the UserPaint bit of the ControlStyles is set, you can override OnPrint to do layered painting. 如需詳細資訊,請參閱 SetStyleSee SetStyle for more information.

適用於

另請參閱