共用方式為


PrinterSettings.MaximumPage 屬性

定義

取得或設定可在 FromPage 內選取的最大 ToPagePrintDialog

public:
 property int MaximumPage { int get(); void set(int value); };
public int MaximumPage { get; set; }
member this.MaximumPage : int with get, set
Public Property MaximumPage As Integer

屬性值

可在 FromPage 內選取的最大 ToPagePrintDialog

例外狀況

MaximumPage 屬性的值小於 0。

備註

當使用者選取列印範圍時,會FromPage使用 PrintDialogToPage 屬性。 屬性 PrintDialog.AllowSomePages 必須設定為 true ,才能讓使用者指定列印範圍。 以程式設計方式設定 FromPageToPage 值時,請確定它們位於 和 MaximumPage 屬性所MinimumPage定義的範圍內,或在顯示 PrintDialog時擲回例外狀況。

適用於

另請參閱