Spread Windows Forms 7.0 Product Documentation
PrintPreviewShowing Event
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > FpSpread Class : PrintPreviewShowing Event


Glossary Item Box

Occurs before the preview dialog appears.

Syntax

Visual Basic (Declaration) 
Public Event PrintPreviewShowing As PrintPreviewShowingEventHandler
Visual Basic (Usage)Copy Code
Dim instance As FpSpread
Dim handler As PrintPreviewShowingEventHandler
 
AddHandler instance.PrintPreviewShowing, handler
C# 
public event PrintPreviewShowingEventHandler PrintPreviewShowing

Event Data

The event handler receives an argument of type PrintPreviewShowingEventArgs containing data related to this event. The following PrintPreviewShowingEventArgs properties provide information specific to this event.

PropertyDescription
Cancel Gets or sets whether to cancel the print preview.
PreviewControl Gets the control associated with the print preview dialog.
PreviewDialog Gets the print preview dialog to be displayed.

Remarks

This event is raised by the OnPrintPreviewShowing method when the print job is aborted.

For more details on the individual event arguments, refer to PrintPreviewShowingEventArgs members.

Example

This example centers the print preview dialog.
C#Copy Code
private void fpSpread1_PrintPreviewShowing(object sender, FarPoint.Win.Spread.PrintPreviewShowingEventArgs e) 
{ 
     e.Preview.StartPosition = FormStartPosition.CenterScreen; 
}
Visual BasicCopy Code
Private Sub FpSpread1_PrintPreviewShowing(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.PrintPreviewShowingEventArgs)
Handles FpSpread1.PrintPreviewShowing 
     e.Preview.StartPosition = FormStartPosition.CenterScreen 
End Sub

Requirements

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

See Also

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