Spread Windows Forms 6.0 Product Documentation
ShowPrintDialog Property
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > PrintInfo Class : ShowPrintDialog Property


Glossary Item Box

Gets or sets whether to display a print dialog before printing.

Syntax

Visual Basic (Declaration) 
Public Property ShowPrintDialog As Boolean
Visual Basic (Usage)Copy Code
Dim instance As PrintInfo
Dim value As Boolean
 
instance.ShowPrintDialog = value
 
value = instance.ShowPrintDialog
C# 
public bool ShowPrintDialog {get; set;}

Property Value

Boolean: true to display the print dialog; false otherwise

Remarks

When this property is set to true, a print dialog appears before the print job is sent, which allows users to customize the printing.

Example

This example shows how to define the settings for displaying dialogs for the end users.
C#Copy Code
// Define the printer settings
FarPoint.Win.Spread.PrintInfo printset = new FarPoint.Win.Spread.PrintInfo();
printset.ShowPrintDialog = true;
printset.AbortMessage = "Do you want to cancel the printing?";
printset.Preview = true;

// Assign the printer settings to the sheet and print it
fpSpread1.Sheets[0].PrintInfo = printset;
fpSpread1.PrintSheet(0);
Visual BasicCopy Code
' Define the printer settings
Dim printset As New FarPoint.Win.Spread.PrintInfo()
printset.ShowPrintDialog = True
printset.AbortMessage = "Do you want to cancel the printing?"
printset.Preview = True

' Assign the printer settings to the sheet and print it
FpSpread1.Sheets(0).PrintInfo = printset
FpSpread1.PrintSheet(0)

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.