1、C#打印
PrintDocment.PrintController = new StandardPrintController(); PrintDocment 默认的 PrintController 是 PrintControllerWithStatusDialog。
2、调用Excel打印
调用Excel执行PrintOut()打印的时候,会提示“正在打印第几页,共多少页。。。”,无法隐藏此窗口,可以设置目前窗口的TopMost为true,来遮盖住打印提示,变相解决此问题。
本文介绍如何在C#中更改默认打印控制器,并提供了一种通过调整窗口属性来间接隐藏Excel打印过程中提示对话框的方法。
PrintDocment 默认的 PrintController 是 PrintControllerWithStatusDialog。
2、调用Excel打印
调用Excel执行PrintOut()打印的时候,会提示“正在打印第几页,共多少页。。。”,无法隐藏此窗口,可以设置目前窗口的TopMost为true,来遮盖住打印提示,变相解决此问题。

被折叠的 条评论
为什么被折叠?