DialogResult dr = MessageBox.Show("Do You Want to Print?", "Print", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dr == DialogResult.Yes) { printDocument1.DefaultPageSettings.PaperSize = new System.Drawing.Printing.PaperSize("Custom", 670, 846); printDocument1.PrinterSettings.DefaultPageSettings.PaperSize = new System.Drawing.Printing.PaperSize("Custom", 670, 846); printDocument1.Print(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)