Kra*_*oji 28 c# printdocument windows-7
我正在使用c#开发全屏信息亭应用程序.我需要打印门票和收据.我使用PrintDocument类进行打印.打印机完美打印,但我需要禁用打印过程中显示的弹出对话框.
我听说可以通过控制面板中的"打印机和传真"禁用它,但我在控制面板中没有"打印机和传真".
我可以禁用显示的对话框吗?如果可以,我该怎么办?
See*_*arp 53
我相信你设置PrintDocument的PrintController来StandardPrintController应该解决这个问题.
PrintDocument printDocument = new PrintDocument();
PrintController printController = new StandardPrintController();
printDocument.PrintController = printController;
Run Code Online (Sandbox Code Playgroud)
希望这会有所帮助.
很棒的问题和答案.这是vb.net的VB.Net版本googling没有返回任何有意义的结果.
Dim printDocument As New System.Drawing.Printing.PrintDocument
Dim printController As New System.Drawing.Printing.StandardPrintController
printDocument.PrintController = printController
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
13278 次 |
| 最近记录: |