PowerTools SPREAD for Windows Forms 8.0J
SetPrintInfo メソッド


PrintInfoオブジェクト
PrintInfoを設定するシート(すべてのシートを指定する場合は-1)
指定したシートにPrintInfoオブジェクトを設定します。
構文
'Declaration
 
Public Sub SetPrintInfo( _
   ByVal pi As PrintInfo, _
   ByVal sheet As Integer _
) 
'使用法
 
Dim instance As FpSpread
Dim pi As PrintInfo
Dim sheet As Integer
 
instance.SetPrintInfo(pi, sheet)
public void SetPrintInfo( 
   PrintInfo pi,
   int sheet
)

パラメータ

pi
PrintInfoオブジェクト
sheet
PrintInfoを設定するシート(すべてのシートを指定する場合は-1)
解説

sheet パラメータを -1に設定すると、SPREAD内のすべてのシートが印刷対象として指定されます。その際、シートごとに個別に印刷ジョブが作成されます。

次のサンプルコードは、指定したシートのPrintInfoオブジェクトを設定し、シートの印刷設定を指定します。
FarPoint.Win.Spread.PrintInfo pi = new FarPoint.Win.Spread.PrintInfo();
FarPoint.Win.Spread.FpSpread fpSpread1 = new FarPoint.Win.Spread.FpSpread();
FarPoint.Win.Spread.SheetView shv = new FarPoint.Win.Spread.SheetView();
fpSpread1.Location = new Point(10, 10);
fpSpread1.Height = 200;
fpSpread1.Width = 400;
Controls.Add(fpSpread1);
fpSpread1.Sheets.Add(shv);
pi.AbortMessage = "Abort Printing?";
fpSpread1.SetPrintInfo(pi, 0);
fpSpread1.PrintSheet(0);
Dim pi As New FarPoint.Win.Spread.PrintInfo()
Dim fpSpread1 As New FarPoint.Win.Spread.FpSpread()
Dim shv As New FarPoint.Win.Spread.SheetView()
fpSpread1.Location = New Point(10, 10)
fpSpread1.Height = 200
fpSpread1.Width = 400
Controls.Add(fpSpread1)
fpSpread1.Sheets.Add(shv)
pi.AbortMessage = "Abort Printing?"
fpSpread1.SetPrintInfo(pi, 0)
fpSpread1.PrintSheet(0)
参照

FpSpread クラス
FpSpread メンバ
PrintInfo クラス

開発者ガイド

印刷オプション

 

 


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