_XDocument4.PrintOut Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Prints the form content as it is rendered in the window corresponding to the form's active view.
public:
void PrintOut();
public void PrintOut ();
abstract member PrintOut : unit -> unit
Public Sub PrintOut ()
Implements
Examples
In the following example, the PrintOut method of the XDocument object is used to print the current view:
thisXDocument.<span class="label">PrintOut</span>();
Remarks
The PrintOut method uses the current printer settings. Returns a permission denied error if called from a form that is not fully trusted.
It is recommended that you don't call the PrintOut method from the OnLoad or OnSwitchView events. You may encounter one or more of the following behaviors when calling the PrintOut method from an OnLoad or OnSwitchView event procedure:
- The view may print incorrectly.
- A blank document may be printed.
- The incorrect view may be printed.
- The following exception may occur:
- "Invalid context for the OM call."