Hi all!
I have currently using PrintPreview to print a WinGrid with header and footer and I can send a print to the printer with the Printer button.
HAVE:
But now the client want a full standard Print Setup, with number of copies and page range like this one:
NEED:
My currently code is:
Dim rpt As New System.Drawing.Printing.PrintDocument rpt.DefaultPageSettings.Landscape = True Dim PageSetupDialog1 = New System.Windows.Forms.PageSetupDialog() PageSetupDialog1.Document = rpt PageSetupDialog1.ShowDialog() UltraGrid1.PrintPreview(UltraGrid1.DisplayLayout, rpt)
Thank you so much!
I ended up creating my own Class to create this logic:
Create UltraGridPrintDoc -> Create Page Setup Dialog -> ShowDialog -> Create UltraPrintPreviewDialog -> ShowDialog
On the BeginPrint event of the UltraGridPrintDoc:
Create Print Dialog -> ShowDialog
You can read more about the Begin Print event here: http://geekswithblogs.net/tonyt/archive/2009/10/22/135659.aspx
About the Page Setup Dialog and Print Dialog you can search in Google by these Microsoft component's.
Hello HugoCore,
I believe that you could use the 'ShowDialog()' method of the 'PrintDialog' class(component).
Please do not hesitate to contact us if you need any additional assistance.