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?
To display the Print dialog box, click (Down arrow) of the Print button or the Start Printing button in the Preview screen, and select Check Settings and Print....
The Print dialog box lets the user select options for a particular print job. For example, the user can specify the printer to use, the range of pages to print, and the number of copies.
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.
Great question and answer. Here is the VB.Net version googling for vb.net wasn't returning any meaningful results.
Dim printDocument As New System.Drawing.Printing.PrintDocument Dim printController As New System.Drawing.Printing.StandardPrintController printDocument.PrintController = printController
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With