473,734 Members | 2,798 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 20999
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
4164
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 arguments and neat formatting becomes more important and as a result I find myself
14
2912
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
18151
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
7901
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
3757
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 "onclick" attribute set to "window.print();". However, that always brings up the print dialog box. ...
1
1313
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
1892
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 window but saving the page as a file. I want the user only to click a button and the page to be printed...
0
1284
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 = "C:\filename.pdf" p.UseShellExecute = True
3
1493
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 i run in to some security issues, can u by pass theese? Thanks for help! /Krille
0
8946
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9449
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9310
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9182
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6735
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6031
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4550
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.