Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I disable the printing page x of y dialog?

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.

screenshot

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?

like image 494
Krankoloji Avatar asked Apr 01 '11 08:04

Krankoloji


People also ask

How do I change the print dialog box?

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....

What does print using dialog mean?

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.


2 Answers

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.

like image 146
SeeSharp Avatar answered Sep 26 '22 03:09

SeeSharp


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 
like image 23
chinto Avatar answered Sep 23 '22 03:09

chinto