Gets or sets the form to be printed.
Assembly: Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)
If the PrintForm component is hosted on a form, the parent form is the default value. If an instance of a PrintForm component is created at run time, the Form property must be set. If it is not, a System.Argument.NullException exception is raised.
When you use the basic Print method or the overloaded Print method with the PrintOption parameter set to CompatibleModeClientAreaOnly or CompatibleModeFullWindow, the form specified by the Form property must be the top-level form. If it is not, an exception is raised. To avoid this, check the TopLevel property of the form before you call Print.
- 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.