語言

PrinterSettings.PrintToFile 屬性

定義

取得或設定一個值,指示列印輸出是否傳送到檔案而非埠。

public:
 property bool PrintToFile { bool get(); void set(bool value); };
public bool PrintToFile { get; set; }
member this.PrintToFile : bool with get, set
Public Property PrintToFile As Boolean

屬性值

true如果列印輸出被傳送到檔案中;否則,。 false 預設值為 false。

備註

當使用者選擇列印PrintToFile選項時,會使用PrintDialog這個屬性。 在這種情況下,輸出埠會被設定為「FILE」,導致 Windows 列印子系統在呼叫該方法時 PrintDocument.Print 提示使用者輸入檔案名稱。

Note

該 PrintToFile 屬性僅由 使用 PrintDialog ,無法程式化設定。 Print to file該PrintDialog選項僅在屬性設定為 PrintDialog.AllowPrintToFile時才會出現true。

適用於

另請參閱