PowerTools SPREAD for Windows Forms 10.0J
SetPrintPreview メソッド


印刷プレビューダイアログ
印刷プレビューダイアログを設定します。
構文
'Declaration
 
Public Overridable Sub SetPrintPreview( _
   ByVal dialog As PrintPreviewDialog _
) 
'使用法
 
Dim instance As FpSpread
Dim dialog As PrintPreviewDialog
 
instance.SetPrintPreview(dialog)
public virtual void SetPrintPreview( 
   PrintPreviewDialog dialog
)

パラメータ

dialog
印刷プレビューダイアログ
次のサンプルコードは、SetPrintPreviewメソッドを使用します。
private void Form1_Load(object sender, EventArgs e)
{
fpSpread1.Sheets.Count = 3;
fpSpread1.Sheets[0].RowCount = 10;
fpSpread1.Sheets[0].ColumnCount = 10;
fpSpread1.Sheets[1].RowCount = 10;
fpSpread1.Sheets[1].ColumnCount = 10;
fpSpread1.Sheets[2].RowCount = 10;
fpSpread1.Sheets[2].ColumnCount = 10;
fpSpread1.Sheets[0].SetClip(0, 0, 3, 3, "Sunday\tMonday\tTuesday\r\nWednesday\tThursday\tFriday\r\nSaturday\tSunday\tMonday");
fpSpread1.Sheets[1].SetClip(0, 0, 3, 3, "January\tFebruary\tMarch\r\nApril\tMay\tJune\r\nJuly\tAugust\tSeptember");
fpSpread1.Sheets[2].SetClip(0, 0, 3, 3, "2012\t2013\t2014\r\n2015\t2016\t2017\r\n2018\t2019\t2020");
}
         
private void button1_Click(object sender, EventArgs e)
{
PrintPreviewDialog pi = new PrintPreviewDialog();
pi.BackColor = Color.Cyan;
pi.ForeColor = Color.Red;
pi.Text = "My preview dialog";  
fpSpread1.SetPrintPreview(pi);
fpSpread1.ActiveSheet.PrintInfo.Preview = true;
fpSpread1.ActiveSheet.PrintInfo.ZoomFactor = 0.75f;
fpSpread1.PrintSheet(fpSpread1.ActiveSheet);
}
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
FpSpread1.Sheets.Count = 3
FpSpread1.Sheets(0).RowCount = 10
FpSpread1.Sheets(0).ColumnCount = 10
FpSpread1.Sheets(1).RowCount = 10
FpSpread1.Sheets(1).ColumnCount = 10
FpSpread1.Sheets(2).RowCount = 10
FpSpread1.Sheets(2).ColumnCount = 10
FpSpread1.Sheets(0).SetClip(0, 0, 3, 3, "Sunday" + vbTab + "Monday" + vbTab + "Tuesday" + vbCrLf + "Wednesday" + vbTab + "Thursday" + vbTab + "Friday" + vbCrLf + "Saturday" + vbTab + "Sunday" + vbTab + "Monday")
FpSpread1.Sheets(1).SetClip(0, 0, 3, 3, "January" + vbTab + "February" + vbTab + "March" + vbCrLf + "April" + vbTab + "May" + vbTab + "June" + vbCrLf + "July" + vbTab + "August" + vbTab + "September")
FpSpread1.Sheets(2).SetClip(0, 0, 3, 3, "2012" + vbTab + "2013" + vbTab + "2014" + vbCrLf + "2015" + vbTab + "2016" + vbTab + "2017" + vbCrLf + "2018" + vbTab + "2019" + vbTab + "2020")
End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim pi As New PrintPreviewDialog()
pi.BackColor = Color.Cyan
pi.ForeColor = Color.Red
pi.Text = "My preview dialog"
FpSpread1.SetPrintPreview(pi)
FpSpread1.ActiveSheet.PrintInfo.Preview = True
FpSpread1.ActiveSheet.PrintInfo.ZoomFactor = 0.75F
FpSpread1.PrintSheet(FpSpread1.ActiveSheet)
End Sub
参照

FpSpread クラス
FpSpread メンバ
PrintPreviewShowing イベント
Preview プロパティ

開発者ガイド

プレビュー表示

 

 


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