Spread Windows Forms 10.0 Product Documentation
PrintInfo Constructor()
Example 


Creates a new PrintInfo object.
Syntax
'Declaration
 
Public Function New()
'Usage
 
Dim instance As New PrintInfo()
public PrintInfo()
Example
FarPoint.Win.Spread.PrintInfo pi = new
FarPoint.Win.Spread.PrintInfo();
FarPoint.Win.Spread.PrintMargin pm = new
FarPoint.Win.Spread.PrintMargin();
FarPoint.Win.Spread.SmartPrintRulesCollection rules = new
FarPoint.Win.Spread.SmartPrintRulesCollection();
rules.Add(new FarPoint.Win.Spread.ScaleRule(FarPoint.Win.Spread.ResetOption.None, 1, 2, 0.5));
rules.Add(new FarPoint.Win.Spread.BestFitColumnRule(FarPoint.Win.Spread.ResetOption.None));
pm.Left = 10;
pm.Right = 10;
pm.Top = 20;
pm.Bottom = 40;
pi.AbortMessage = "Do you want to cancel printing??";
pi.BestFitCols = true;
pi.BestFitRows = true;
pi.ColEnd = 20;
pi.ColStart = 1;
pi.FirstPageNumber = 1;
pi.Footer = "This is Page /p/nof /pc Pages";
pi.Header = "Print Job For /nFPT Inc.";
pi.JobName = "New Print Job";
pi.Margin = pm;
pi.Orientation = FarPoint.Win.Spread.PrintOrientation.Portrait;
pi.PageEnd = 5;
pi.PageOrder = FarPoint.Win.Spread.PrintPageOrder.Auto;
pi.PageStart = 1;
pi.Preview = false;
pi.Printer = "HP6L";
pi.PrintType = FarPoint.Win.Spread.PrintType.CellRange;
pi.RowEnd = 20;
pi.RowStart = 1;
pi.ShowBorder = false;
pi.ShowColor = false;
pi.ShowColumnHeader = false;
pi.ShowGrid = true;
pi.ShowPrintDialog = true;
pi.ShowRowHeader = FarPoint.Win.Spread.PrintHeader.Hide;
pi.ShowShadows = false;
pi.SmartPrintRules = rules;
pi.UseMax = False;
pi.UseSmartPrint = true;
pi.ZoomFactor = 2;
fpSpread1.ActiveSheet.PrintInfo = pi;
Dim pi As New FarPoint.Win.Spread.PrintInfo
Dim pm As New FarPoint.Win.Spread.PrintMargin
Dim rules As New FarPoint.Win.Spread.SmartPrintRulesCollection
rules.Add(New FarPoint.Win.Spread.ScaleRule(FarPoint.Win.Spread.ResetOption.None, 1, 2, 0.5))
rules.Add(New FarPoint.Win.Spread.BestFitColumnRule(FarPoint.Win.Spread.ResetOption.None))
pm.Left = 10
pm.Right = 10
pm.Top = 20
pm.Bottom = 40
pi.AbortMessage = "Do you want to cancel printing??"
pi.BestFitCols = True
pi.BestFitRows = True
pi.ColEnd = 20
pi.ColStart = 1
pi.FirstPageNumber = 1
pi.Footer = "This is Page /p/nof /pc Pages"
pi.Header = "Print Job For /nFPT Inc."
pi.JobName = "New Print Job"
pi.Margin = pm
pi.Orientation = FarPoint.Win.Spread.PrintOrientation.Portrait
pi.PageEnd = 5
pi.PageOrder = FarPoint.Win.Spread.PrintPageOrder.Auto
pi.PageStart = 1
pi.Preview = False
pi.Printer = "HP6L"
pi.PrintType = FarPoint.Win.Spread.PrintType.CellRange
pi.RowEnd = 20
pi.RowStart = 1
pi.ShowBorder = False
pi.ShowColor = False
pi.ShowColumnHeader = FarPoint.Win.Spread.PrintHeader.Hide
pi.ShowGrid = True
pi.ShowPrintDialog = True
pi.ShowRowHeader = FarPoint.Win.Spread.PrintHeader.Hide
pi.ShowShadows = False
pi.SmartPrintRules = rules
pi.UseMax = False
pi.UseSmartPrint = True
pi.ZoomFactor = 2
FpSpread1.ActiveSheet.PrintInfo = pi
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

PrintInfo Class
PrintInfo Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.