winform打印多页去掉"正在打印"提示窗口,直接打印

原本只需要有

printDocument1.Print();

这段代码就可以了,但是现在为了要去掉“正在打印”的提示窗口所以需要在上面的代码前面加入以下两行代码即可。注意要引用

using System.Drawing.Printing;

//以下是打印的完成程序 

StandardPrintController spc = new StandardPrintController();
printDocument1.PrintController = spc;
printDocument1.Print();

本文转自:http://www.ywrj.net/a/NET/CSharp/20120717/11476.html

posted on 2012-07-17 10:02  俄罗斯水手  阅读(343)  评论(0编辑  收藏  举报

导航