PrintForm.OnBeginPrint Method
Raises the BeginPrint event.
Namespace: Microsoft.VisualBasic.PowerPacks.Printing
Assembly: Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)
Syntax
'宣告
Protected Overridable Sub OnBeginPrint ( _
e As PrintEventArgs _
)
protected virtual void OnBeginPrint(
PrintEventArgs e
)
protected:
virtual void OnBeginPrint(
PrintEventArgs^ e
)
abstract OnBeginPrint :
e:PrintEventArgs -> unit
override OnBeginPrint :
e:PrintEventArgs -> unit
protected function OnBeginPrint(
e : PrintEventArgs
)
Parameters
- e
Type: System.Drawing.Printing.PrintEventArgs
An EventArgs that contains the event data.
Remarks
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The OnBeginPrint method also enables derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors
When overriding OnBeginPrint in a derived class, make sure to call the OnBeginPrint method of the base class so that registered delegates receive the event.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.VisualBasic.PowerPacks.Printing Namespace
Other Resources
PrintForm Component (Visual Basic)
How to: Print a Form by Using the PrintForm Component (Visual Basic)
How to: Print the Client Area of a Form (Visual Basic)
How to: Print Client and Non-Client Areas of a Form (Visual Basic)
How to: Print a Scrollable Form (Visual Basic)
Deploying Applications That Reference the PrintForm Component (Visual Basic)