MultiRow Windows Forms > Developer's Guide > Using MultiRow > Print and Print Preview > Custom Printing |
You can use the GcMultiRow.Document property to customize printing while using the print control of the .NET Framework.
You can get the user's result if you display the print preview using the PageSetupDialog control.
This example uses the PageSetupDialog control.
Imports System.Drawing.Printing Dim document As PrintDocument = New PrintDocument() GcMultiRow1.Document = document Using pageSetupDialog As PageSetupDialog = New PageSetupDialog() pageSetupDialog.Document = document If pageSetupDialog.ShowDialog(Me) = Windows.Forms.DialogResult.OK Then Console.WriteLine("OK was clicked.") Else Console.WriteLine("Cancel was clicked.") End If End Using |
using System.Drawing.Printing; PrintDocument document = new PrintDocument(); gcMultiRow1.Document = document; using (PageSetupDialog pageSetupDialog = new PageSetupDialog()) { pageSetupDialog.Document = document; if (pageSetupDialog.ShowDialog(this) == DialogResult.OK) Console.WriteLine("OK was clicked."); else Console.WriteLine("Cancel was clicked."); } |