我可以禁用y对话框的打印页面x吗? [英] Can I disable the printing page x of y dialog?

查看:96
本文介绍了我可以禁用y对话框的打印页面x吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用c#开发全屏信息亭应用程序.我需要打印票和收据.我使用PrintDocument类进行打印.打印机可以完美打印,但是我需要禁用打印过程中显示的弹出对话框.

I am developing a full screen kiosk application using c#. I need to print tickets and receipts. I use the PrintDocument class for the printing. Printer prints perfectly, but i need to disable the pop-up dialog shown during printing.

我听说可以通过控制面板中的打印机和传真"将其禁用,但是我在控制面板中没有打印机和传真".

I heard it can be disabled with Printers and Faxes in control panel, but i do not have Printers and Faxes in control panel.

我可以禁用显示的对话框吗?如果可以的话,我该怎么办?

Can i disable the dialog shown? If i could, how can i do it?

推荐答案

我相信将您的PrintDocumentPrintController设置为StandardPrintController应该可以解决此问题.

I believe setting your PrintDocument's PrintController to StandardPrintController should solve this.

PrintDocument printDocument = new PrintDocument();
PrintController printController = new StandardPrintController();
printDocument.PrintController = printController;

希望这对您有所帮助.

Hope this helps some.

这篇关于我可以禁用y对话框的打印页面x吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆