Home All Groups Group Topic Archive Search About

Simple way to supress print notification or system hooks???

Author
10 Aug 2006 1:39 PM
Milan Todorovic
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

Author
10 Aug 2006 3:48 PM
AMercer
> 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.

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
Author
10 Aug 2006 4:04 PM
Milan Todorovic
Thanks. I knew there had to be something simple. I can't believe I didn't
catch that in the docs.
Milan

Show quoteHide quote
"AMercer" <AMer***@discussions.microsoft.com> wrote in message
news:3CCCF7BA-2ED7-4827-93B2-E6FADA0D494A@microsoft.com...
>> 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.
>
> 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
>
Author
10 Aug 2006 5:18 PM
AMercer
> Thanks. I knew there had to be something simple. I can't believe I didn't
> catch that in the docs.

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
me the answer that I passed on to you.