Visual Basic Development Bookmark and Share   
 Home > Visual Basic Power Packs > How Can I Suppress the 2005 Printing Status Dialog?
 

How Can I Suppress the 2005 Printing Status Dialog?

We are using the Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6 namespace Printer object to print bar code labels in an application converted from VB6. What would be the easiest way to suppress the printing status dialog?

Some background:

This is being done in a VB .NET 2005 Windows forms application. Our users have the Framework 2.0 and cannot easily be given 3.X at this time.

Unlike in the VB6 equivalent, printing results in a brief status dialog appearing, and then disappearing. The dialog has caption of "Printing" and a text reading "Page 1 of document." The dialog box has a Cancel button on it, although a user would have to have quite fast hand-eye coordination to use it before it disappears.

Users work quickly to create customer-identifying bar codes for incoming correspondence. Some are amazingly quick. For this reason, we call print logic asynchronously, which works fine. However, if the user is typing in the next customer number, and the status dialog pops up, this causes an annoying loss of focus in the text box control they are typing into.

Rewriting to not use the compatibility library would be tricky and require a lot of testing. I suppose I could write the information to the database and have the printing done by a background server process, but ideas pointing to a more elegant solution will be greatly appreciated.

Steve Eisenberg Pennsylvania, USA

Steven E  Friday, June 20, 2008 9:52 PM
The Printer in the compatibility library simply uses a PrintDocument to perform its printing and this status dialog is presented by it. As far as I know there isn't a way to surpress it.

Sorry I don't have a better answer for you
John Hart (Microsoft)
JohnHart_MSFT  Friday, June 27, 2008 1:27 AM
We have successfully switched to the API method described inQ322090 ("How to send raw data to a printer by using Visual Basic .NET"). Fast printing, no annoying dialog boxes, happy users.
  • Marked As Answer bySteven E Wednesday, July 02, 2008 9:40 PM
  •  
Steven E  Wednesday, July 02, 2008 9:39 PM
The Printer in the compatibility library simply uses a PrintDocument to perform its printing and this status dialog is presented by it. As far as I know there isn't a way to surpress it.

Sorry I don't have a better answer for you
John Hart (Microsoft)
JohnHart_MSFT  Friday, June 27, 2008 1:27 AM
We have successfully switched to the API method described inQ322090 ("How to send raw data to a printer by using Visual Basic .NET"). Fast printing, no annoying dialog boxes, happy users.
  • Marked As Answer bySteven E Wednesday, July 02, 2008 9:40 PM
  •  
Steven E  Wednesday, July 02, 2008 9:39 PM
The Printer in the compatibility library simply uses a PrintDocument to perform its printing and this status dialog is presented by it. As far as I know there isn't a way to surpress it.

Sorry I don't have a better answer for you
John Hart (Microsoft)

I managed to do it through code. (WinForms).

After 2 days of experimenting, the following code did the trick:

printDoc.PrintController

= new StandardPrintController()

Hope this helps someone,
Luka Gospodnetic, IN2

I managed to do it through code. (WinForms).
();

lugospod  Thursday, November 19, 2009 6:52 PM

You can use google to search for other answers

Custom Search

More Threads

• runtime error 339
• Queries related to imgscan.ocx
• How do i post the data to the internet in visual basic 2005 instead of the asp web page
• Problem with CrossPage Postback to Display Data from Repeater
• InteropForm AddIn does not appear?
• Installing InterOpFormTool on a client machine
• Unable to clear datarepeater
• Print Gets Cut Off - But Only with 2.0
• Is there any sample code available for the DataRepeater?
• MySQL database working with datarepeater