直接打印则需要调用PrintDocumnt.Print()方可打印,否按在对话框中点【打印】但不会有反应

private void Tsb_print_Click(object sender, EventArgs e)
        {
            printDialog1.Document = printDocument1;
            printDialog1.AllowSomePages = true;
            
            DialogResult result = printDialog1.ShowDialog();

            // If the result is OK then print the document.
            //打印预览时只要printPreviewDialog1.Document = printDocument1关联后就可的打印
            //直接打印则需要调用PrintDocumnt.Print()方可打印,否按在对话框中点【打印】但不会有反应
            if (result == DialogResult.OK)
            {
                printDocument1.Print();
            }

        }
原文地址:https://www.cnblogs.com/windy3417/p/13865212.html