Spread Windows Forms 12.0 Product Documentation
AbortMessage Property (PrintInfo)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > PrintInfo Class : AbortMessage Property
Gets or sets the message to display for the abort dialog.
Syntax
'Declaration
 
Public Property AbortMessage As String
'Usage
 
Dim instance As PrintInfo
Dim value As String
 
instance.AbortMessage = value
 
value = instance.AbortMessage
public string AbortMessage {get; set;}

Property Value

String containing the message to display
Remarks

This property specifies the text to display in an abort dialog box that lets the user cancel printing. The abort dialog box appears if the user chooses the Cancel button in a print dialog while printing. When the abort dialog box appears, the PrintAbort event occurs.

If you do not provide a message, the Spread component does not display the abort dialog box.

You can supply your own message box instead of the built-in message box using the PrintMessageBox event.

Example
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;
fpSpread1.PrintSheet(0);
' 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)
See Also

Reference

PrintInfo Class
PrintInfo Members
PrintAbort Event
PrintMessageBox Event

User-Task Documentation

Displaying Dialogs for Users