Groups | Blog | Home
all groups > vb.net controls > august 2006 >

vb.net controls : Simple way to supress print notification or system hooks???


Milan Todorovic
8/10/2006 8:39:37 AM
Hello,

I need help with something that should be pretty trivial, but I can't seem
to find an easy way to do it.

I have a printing routine set up in a windows vb.net 2005 app. The routine
has all the printing settings defined, so no PrintDialog is needed. However,
when printing starts, the application displays a print notification window
while buffering information. Granted, it's there for only a second or so,
but I need this window suppressed nevertheless.

I'd expect this to be a simple switch of the PrintController object, but it
isn't. Is there an easy way to do this? If not, can somebody point me in the
right direction about writing a system hook that intercepts the message from
the printer.

Much obliged,

Milan

AMercer
8/10/2006 8:48:02 AM
[quoted text, click to view]

The following works for me in vb 2003. I think all that you need to do is
to not use the default PrintController object - to do that, you just make a
new one:

dim pd as New Printing.PrintDocument
....
pd.PrintController = New Printing.StandardPrintController ' add this line
<<----
....
pd.Print
AMercer
8/10/2006 10:18:02 AM
[quoted text, click to view]

I didn't get it from the docs. I got this tip from these newsgroups. I
posted your question a couple of years ago and someone (an mvp I think) gave
Milan Todorovic
8/10/2006 11:04:39 AM
Thanks. I knew there had to be something simple. I can't believe I didn't
catch that in the docs.
Milan

[quoted text, click to view]

AddThis Social Bookmark Button