473,401 Members | 2,139 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

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

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
Aug 10 '06 #1
3 1593
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

Aug 10 '06 #2
Thanks. I knew there had to be something simple. I can't believe I didn't
catch that in the docs.
Milan

"AMercer" <AM*****@discussions.microsoft.comwrote in message
news:3C**********************************@microsof t.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

Aug 10 '06 #3
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.
Aug 10 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Tim O'Connell | last post by:
Hi, I'm using Python 2.3 on a Win XP box, and I'm trying to find if there's a library of some sort that will give you a callback (or something comparable) when a new disc is inserted into a CD...
2
by: Alex | last post by:
I am trying to determine if C# has the capabilities to listen for system events when the application does not have the window's focus. I am writing a windows application that I would like to run...
0
by: grutta | last post by:
I am writing a windows service that will recieve notification when a USB Device is insterted into the machine. I have used the RegisterDeviceNotification and the RegisterServiceCtrlHandlerEx with...
5
by: Jim Hubbard | last post by:
I don't think you can hook system events outside your application in .Net without using an unmanaged DLL, but I thought I'd ask. Jim Hubbard
1
by: Nikhil Mittal | last post by:
How to supress system errors in windows perl In unix it is 2>&1 , what is in windows :o
0
Mague
by: Mague | last post by:
Hey, I've looked up system hooks but i cannot find how to use key hooks on Visual Studio 2005. I want to use system hook to detect if Ctrl R to start a pitucalar part of the program and Ctrl S to...
22
by: schneider | last post by:
I need to hook the system mouse down event. I'm trying to replicate how a context menu hides when the mouse clicks outside of the control. Thanks, Schneider
6
by: =?Utf-8?B?QnJhc3NpY2FOaWdyYQ==?= | last post by:
Greetings, I have a web application that prints a form using PrintDocument on the server. Currently it is set up to print to the default printer (on the server). My users would like to be...
18
by: =?Utf-8?B?SGVyYg==?= | last post by:
I'm using a ReportViewer in ASP.NET. From the development environment it works fine. When published and I try to open the page with the ReportViewer I get the error: An internal error occurred...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.