Hi,
I'm using a PrintPreviewDialog to display a grid's content before printing.
The user should be able to limit the printed pages. I want to do it with these options:
myPrintDoc.DefaultPageSettings.PrinterSettings.ToPage myPrintDoc.DefaultPageSettings.PrinterSettings.FromPage
My first choice was to open a form during the myUltraPreviewDiaglog.Printing event where the user could specify these values.
But now I'd like to group this function with other functions and make them accessible while the user is looking at the preview.
To sum it up:Is it possible to add an menu item or button tool to the toolbar in the print preview dialog to open a new form where the user can define the layout and the ToPage and FromPage settings?
I'm using NetAdvantage for Windows Forms 2006 Vol 3
TIAJan C. Potthoff
Hi bgfe, I have an idea that you can use. You can catch the Printing event of the PrintPreviewDialog and when you catch the event you can cancel it and show your own print dialog window. e.g.
// cancel the printing for PrintPreviewDialog
// the printdialog will handle the printing
}
/// <summary>
/// Shows a print dialog to print the report.
/// </summary>
/// <param name="owner">IWin32Window owner.</param>
{
this.GridPrintDocument.Grid = this.Grid;
dlg.AllowSelection = true;
dlg.Document = this.GridPrintDocument;