Name
PrintDialog
Synopsis
This CommonDialog is used to determine which
portions of a document to print, on which printer.
You can enable and disable various bits of functionality with the
AllowPrintToFile,
AllowSelection, AllowSomePages,
and ShowNetwork properties. The
PrintToFile member allows you to programmatically
switch between file and printer output.
The PrinterSettings to be modified can be
specified either through the Document, or
alternatively, you can choose a particular
PrinterSettings object to manipulate.
Finally, you can restore default settings with the Reset() method.
public sealed class PrintDialog : CommonDialog { // Public Constructors public PrintDialog(); // Public Instance Properties public bool AllowPrintToFile{set; get; } public bool AllowSelection{set; get; } public bool AllowSomePages{set; get; } public PrintDocument Document{set; get; } public PrinterSettings PrinterSettings{set; get; } public bool PrintToFile{set; get; } public bool ShowHelp{set; get; } public bool ShowNetwork{set; get; } // Public Instance Methods public override void Reset(); // overrides CommonDialog // Protected Instance Methods protected override bool RunDialog(IntPtr hwndOwner); // overrides CommonDialog }
Hierarchy
System.Object
→ System.MarshalByRefObject → System.ComponentModel.Component(System.ComponentModel.IComponen,
System.IDisposable)
→ CommonDialog → PrintDialog
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access