Spread Windows Forms 17
Spread Windows Forms 17.0 Product Documentation / Developer's Guide / Printing / Customizing the Appearance of the Printing / Customizing the Print Preview Dialog
In This Topic
    Customizing the Print Preview Dialog
    In This Topic

    You can customize the Print Preview settings to show the Print Preview Dialog like Excel by using the EnhancePreview property of the PrintInfo class.

    The following image shows the printing options that appear on your screen after setting the EnhancePreview property to true.

    Print Preview dialog displaying various printing operations

    Using Code

    Set the EnhancePreview property of the PrintInfo class to true in order to customize the print preview setting to show the Print Preview Dialog like Excel.

    Example

    This example shows how to set the EnhancePreview property.

    C#
    Copy Code
    //Code to show print preview dialog like Excel
    
    fpSpread1.ActiveSheet.Cells[1, 1].Value = "1,1";
    fpSpread1.ActiveSheet.Cells[10, 10].Value = "10,10";
    fpSpread1.ActiveSheet.PrintInfo.EnhancePreview = true;
    fpSpread1.PrintSheet(fpSpread1.ActiveSheet);
    
    VB
    Copy Code
    'Code to show print preview dialog like Excel
    fpSpread1.ActiveSheet.Cells(1, 1).Value = "1,1"
    fpSpread1.ActiveSheet.Cells(10, 10).Value = "10,10"
    fpSpread1.ActiveSheet.PrintInfo.EnhancePreview = True
    fpSpread1.PrintSheet(fpSpread1.ActiveSheet)
    
    See Also