private void printButton_Click(object sender, EventArgs e) { this.printDocument1.DefaultPageSettings.PaperSize = new System.Drawing.Printing.PaperSize("custom", this.printDocument1.DefaultPageSettings.PaperSize.Width, 480); CoolPrintPreviewDialog dlg = new CoolPrintPreviewDialog(); dlg.Document = this.printDocument1; //dlg.WindowState = FormWindowState.Maximized; dlg.Size = new Size(800, 600); dlg.Show(this); /* if (dlg.ShowDialog(this) == System.Windows.Forms.DialogResult.OK) { //SaveButton.PerformClick(); } */ }
private void printButton_Click(object sender, EventArgs e) { this.printDocument1.DefaultPageSettings.PaperSize = new System.Drawing.Printing.PaperSize("custom", this.printDocument1.DefaultPageSettings.PaperSize.Width, 480); CoolPrintPreviewDialog dlg = new CoolPrintPreviewDialog(); dlg.Document = this.printDocument1; //dlg.WindowState = FormWindowState.Maximized; dlg.Size = new Size(800, 600); dlg.Show(this); /* * if (dlg.ShowDialog(this) == System.Windows.Forms.DialogResult.OK) * { * //SaveButton.PerformClick(); * } */ }