473,555 Members | 2,333 Online
Bytes | Software Development & Data Engineering Community
+ 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 20967
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.co m> wrote in message
news:eo******** *******@TK2MSFT NGP11.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
StandardPrintCo ntroller as the default is a PrintController WithStatusDialo g
which will show the progress.

Ron Allen
"Mike" <mi**@here.co m> wrote in message
news:eo******** *******@TK2MSFT NGP11.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******** ******@TK2MSFTN GP11.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
StandardPrintCo ntroller as the default is a PrintController WithStatusDialo g which will show the progress.

Ron Allen
"Mike" <mi**@here.co m> wrote in message
news:eo******** *******@TK2MSFT NGP11.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
4139
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' anything similar you like. Would make my life so much easier. Often I start with a nice and short print statement, then there happen to be more...
14
2892
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: $Revision: 0.0 $
3
18142
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 them without any user interaction. Thanks! ~Steven
1
7889
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
3706
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 print the current contents of the browser without bringing up the print dialog. At first I thought it was a simple matter to have the button's...
1
1309
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 Service Pack 2, the dialog box appears and I don't know what to do to "remove" it. Thanks a lot. Alba ;)
1
1887
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 only to click a button and the page to be printed on the default printer. Is it possible? And also want to print a page without showing the print...
0
1282
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. Please help. Dim p As New System.Diagnostics.ProcessStartInfo() p.Verb = "print" p.WindowStyle = ProcessWindowStyle.Hidden p.FileName =...
3
1480
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 with help of an activex controler. Anyways do anybody know how to do this with c#? I have gotten an activex control working but when i want to print...
0
7622
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7547
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7825
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7588
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6176
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5171
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3596
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1159
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
865
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.