Exemple #1
0
        //列印按鈕
        private void btnPrint_Click(object sender, EventArgs e)
        {
            ReadPrintFile();//呼叫載入檔案方法

            //啟用「頁數」選項按鈕,「選取範圍」選項按鈕
            DlgPrint.AllowSomePages = true;
            DlgPrint.AllowSelection = true;

            //列印文件指定給列印對話方塊
            DlgPrint.Document = DocumentPrt;
            DialogResult result = DlgPrint.ShowDialog();

            //開啟列印對話方塊按OK鈕就執行列印
            if (result == DialogResult.OK)
            {
                DocumentPrt.Print(); //執行列印
            }
        }
Exemple #2
0
 public IpfPack(DlgPrint dlg)
 {
     Print = dlg;
 }