Spread Windows Forms 13.0 Product Documentation
FarPoint.Win.Spread Assembly / FarPoint.Win.Spread Namespace / PrintInfo Class / ShowPrintDialog Property

In This Topic
    ShowPrintDialog Property
    In This Topic
    Gets or sets whether to display a print dialog before printing.
    Public Property ShowPrintDialog As Boolean
    Dim instance As PrintInfo
    Dim value As Boolean
    instance.ShowPrintDialog = value
    value = instance.ShowPrintDialog
    public bool ShowPrintDialog {get; set;}

    Property Value

    Boolean: true to display the print dialog; false otherwise

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

    This example shows how to define the settings for displaying dialogs for the end users.
    // 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;
    ' 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
    See Also