private void btnPrint_Click(object sender, EventArgs e) { using (PrintDialog vPrintDlg = new PrintDialog()) { vPrintDlg.PrinterSettings.MaximumPage = FEmrView.PageCount; if (vPrintDlg.ShowDialog() == DialogResult.OK) { FEmrView.Print(vPrintDlg.PrinterSettings.PrinterName); } } }