Gets or sets a value indicating whether the output is directed to a printer, to a print preview window, or to a file.
Assembly: Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)
When PrintToPrinter is selected, the output is directed to the system default printer. You can override this behavior and explicitly set the printer and printer properties by using the PrinterSettings property. If no default printer is available, the user is prompted to select a printer.
When PrintToFile is selected, an image of the form is saved to an Encapsulated PostScript file (.eps, .ps, or .ai) in the path specified by the PrintFileName property. If no file name is specified, the user is prompted for a file name.
Files are saved in an 8-bit Greyscale PostScript format. 24-bit RGB PostScript is not supported.
If RadioButton1.Checked = True Then PrintForm1.PrintAction = Printing.PrintAction.PrintToPrinter ElseIf RadioButton2.Checked = True Then PrintForm1.PrintAction = Printing.PrintAction.PrintToPreview Else PrintForm1.PrintFileName = _ My.Computer.FileSystem.SpecialDirectories.CurrentUserApplicationData _ & "Form1.eps" PrintForm1.PrintAction = Printing.PrintAction.PrintToFile End If
- 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.