473,463 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Print without the print dialog box

Hi,

Is there anyway to print from VB.NET or C# and bypass the printer dialog
box?

Thanks
Mike
Nov 21 '05 #1
3 20944
Hi Mike,
If you want to print without user interaction, then according to this KB
article, it is not possible:
http://support.microsoft.com/default...b;en-us;820644

However, just came across a nice workaround suggested on the net, worth
trying :
Follow this thread :
http://groups.google.com/groups?hl=e...3DN%26tab%3Dwg

HTH,
Anushi
"Mike" <mi**@here.com> wrote in message
news:eo***************@TK2MSFTNGP11.phx.gbl...
Hi,

Is there anyway to print from VB.NET or C# and bypass the printer dialog
box?

Thanks
Mike

Nov 21 '05 #2
Mike,
You can just create a new PrinterSettings object in code which will have
the default settings in it and use that for your PrintDocument's
PrinterSettings. If you mean the printing progress dialog just set the
PrintController of your PrintDocument to an instance of
StandardPrintController as the default is a PrintControllerWithStatusDialog
which will show the progress.

Ron Allen
"Mike" <mi**@here.com> wrote in message
news:eo***************@TK2MSFTNGP11.phx.gbl...
Hi,

Is there anyway to print from VB.NET or C# and bypass the printer dialog
box?

Thanks
Mike

Nov 21 '05 #3

Ron,

I was meaning the initial select your printer dialog box, Anushi has come up
with a page to a work around. How's about this then... Is it possible to
change the machine to not show the printer dialog, this is because we have a
process running on a machine that will create PDF documents using the Adobe
PDF driver and we really want the application to work without user
intervention, is that possible though some registry hack or something?

Regards
Mike

"Ron Allen" <rallen@_nospam_src-us.com> wrote in message
news:uP**************@TK2MSFTNGP11.phx.gbl...
Mike,
You can just create a new PrinterSettings object in code which will have the default settings in it and use that for your PrintDocument's
PrinterSettings. If you mean the printing progress dialog just set the
PrintController of your PrintDocument to an instance of
StandardPrintController as the default is a PrintControllerWithStatusDialog which will show the progress.

Ron Allen
"Mike" <mi**@here.com> wrote in message
news:eo***************@TK2MSFTNGP11.phx.gbl...
Hi,

Is there anyway to print from VB.NET or C# and bypass the printer dialog
box?

Thanks
Mike


Nov 21 '05 #4

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

Similar topics

30
by: Martin Bless | last post by:
Why can't we have an additional 'print' statement, that behaves exactly like 'print' but doesn't insert that damn blank between two arguments? Could be called 'printn' or 'prin1' or 'prinn'...
14
by: Marcin Ciura | last post by:
Here is a pre-PEP about print that I wrote recently. Please let me know what is the community's opinion on it. Cheers, Marcin PEP: XXX Title: Print Without Intervening Space Version:...
3
by: Steven | last post by:
Hi all, Is it possible to do an ie print from javascript that does not bring up the print dialog? I'm in a situation where i need to load a sequence of files into a browser and print all of...
1
by: Walter Beierdonck | last post by:
Hi, I've written a script dat has to run with a windows-shortcut... ex: http://www.domein.com/script.php This is my script: <html> <head> <script> var howLong = 2000;
3
by: John Peterson | last post by:
Hello all! I'm at my wits end trying to search for what I assumed to be a relatively straightforward task. I have a Web application written in C#, and I have a button on the form that I want to...
1
by: Alba López | last post by:
Hi, I want to print a webform directly to the default printer, without showing the user the print dialog box. I used to do it with window.open and it worked as I wanted to, but after installing...
1
pankil
by: pankil | last post by:
Hello, I'm a very beginner in Javascript and sorry if my question sounds stupidly. I want to print a page without showing the print window and without saving the page as a file. I want the user...
0
by: engloon | last post by:
Hi guys. I found this code that read a file then print out. The problem that I'm facing is, I have a lot of files to be printed, so I would like to print without showing the print property menu....
3
by: krille | last post by:
Hello fellow developers! I want to print from a webpage without showing any kind of dialog. After some research some ppl say it´s impossible and som say it´s not. In fact I have seen it be done...
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
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.