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

PaintEventArgs,其中包含事件資料。A 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.

適用於

另請參閱