PowerTools SPREAD for Windows Forms 8.0J
TotalPage プロパティ


印刷ページの総数を取得します。
構文
'Declaration
 
Public ReadOnly Property TotalPage As Integer
'使用法
 
Dim instance As PrintDocumentEventArgs
Dim value As Integer
 
value = instance.TotalPage
public int TotalPage {get;}
次のサンプルコードは、PrintDocumentイベントを使用します。
private void Form1_Load(object sender, EventArgs e)
        {
    fpSpread1.Sheets.Count = 2;
    fpSpread1.Sheets[0].Cells[0, 0].Text = "Print Sheet 1";
    fpSpread1.Sheets[1].Cells[0, 0].Text = "Print Sheet 2";
        }

        private void button1_Click(object sender, EventArgs e)
        {
            fpSpread1.PrintSheet(-1);
        }

        private void fpSpread1_PrintDocument(object sender, FarPoint.Win.Spread.PrintDocumentEventArgs e)
        {
    listBox1.Items.Add(e.CurrentPage.ToString());
    listBox1.Items.Add(e.EventType.ToString());
    listBox1.Items.Add(e.TotalPage.ToString());
    listBox1.Items.Add(e.PrintAction.ToString());
        }
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    FpSpread1.PrintSheet(-1)
End Sub

Private Sub FpSpread1_PrintDocument(sender As Object, e As FarPoint.Win.Spread.PrintDocumentEventArgs) Handles FpSpread1.PrintDocument
    ListBox1.Items.Add(e.CurrentPage.ToString())
    ListBox1.Items.Add(e.EventType.ToString())
    ListBox1.Items.Add(e.TotalPage.ToString())
    ListBox1.Items.Add(e.PrintAction.ToString())
End Sub

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    FpSpread1.Sheets.Count = 2
    FpSpread1.Sheets(0).Cells(0, 0).Text = "Print Sheet 1"
    FpSpread1.Sheets(1).Cells(0, 0).Text = "Print Sheet 2"
End Sub
参照

PrintDocumentEventArgs クラス
PrintDocumentEventArgs メンバ

 

 


© 2004-2015, GrapeCity inc. All rights reserved.