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


Glossary Item Box

Occurs when a print job is discontinued by the user.

Syntax

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

Remarks

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

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

Example

This example raises the PrintCancelled event.
C#Copy Code
private void button1_Click(object sender, System.EventArgs e)
{
       FarPoint.Win.Spread.PrintInfo pi = new FarPoint.Win.Spread.PrintInfo(); 
       pi.ShowPrintDialog =true;
       fpSpread1.Sheets[0].PrintInfo = pi;
       fpSpread1.PrintSheet(0);
}

private void fpSpread1_PrintCancelled(object sender, FarPoint.Win.Spread.PrintCancelledEventArgs e)
{
       textBox1.Text="PrintCancelled";
}
Visual BasicCopy Code
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 
       Dim pi As New FarPoint.Win.Spread.PrintInfo()
       pi.ShowPrintDialog = True
       FpSpread1.Sheets(0).PrintInfo = pi
       FpSpread1.PrintSheet(0)
 End Sub

Private Sub FpSpread1_PrintCancelled(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.PrintCancelledEventArgs) Handles
FpSpread1.PrintCancelled
        TextBox1.Text = "printcancelled"
End Sub

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.