473,499 Members | 1,576 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Silent printing

I want to implement silent printing in my project to print reports
programmatically, so that a user will not see any pop-up messages to do
with the printing process. For instance, I want to hide the "Printing
Page 1 of document.." dialog.

Curently I use .Print() method.

I found this article that solves problem within DevExp but i don't
wanna buy this component only because of this one feature... :(

http://www.devexpress.com/Support/Kn....xml?kbid=2658

Nov 17 '05 #1
5 11059
I don't know of a way to hide this dialog. However, even if you do hide
that, if your product runs on XP service pack 2, a balloon dialog will pop
up from the system tray indicating that the document was printed. You won't
be able to turn this off at all, as it is considered a security feature
(what if some program was printing documents from your machine over and over
again?).

In the end, you won't be able to have truly silent printing.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<ze***********@gmail.com> wrote in message
news:11********************@g14g2000cwa.googlegrou ps.com...
I want to implement silent printing in my project to print reports
programmatically, so that a user will not see any pop-up messages to do
with the printing process. For instance, I want to hide the "Printing
Page 1 of document.." dialog.

Curently I use .Print() method.

I found this article that solves problem within DevExp but i don't
wanna buy this component only because of this one feature... :(

http://www.devexpress.com/Support/Kn....xml?kbid=2658

Nov 17 '05 #2
Zeljko,
Set the PrintController of your PrintDocument to an instance of
StandardPrintController. The default is PrintControllerWithStatusDialog
which produces the status dialog.

Ron Allen
<ze***********@gmail.com> wrote in message
news:11********************@g14g2000cwa.googlegrou ps.com...
I want to implement silent printing in my project to print reports
programmatically, so that a user will not see any pop-up messages to do
with the printing process. For instance, I want to hide the "Printing
Page 1 of document.." dialog.

Curently I use .Print() method.

I found this article that solves problem within DevExp but i don't
wanna buy this component only because of this one feature... :(

http://www.devexpress.com/Support/Kn....xml?kbid=2658

Nov 17 '05 #3
This 2 lines did the work, thanks!

doc.PrintController = new StandardPrintController();
doc.Print();

Željko

Ron Allen wrote:
Zeljko,
Set the PrintController of your PrintDocument to an instance of
StandardPrintController. The default is PrintControllerWithStatusDialog
which produces the status dialog.

Ron Allen
<ze***********@gmail.com> wrote in message
news:11********************@g14g2000cwa.googlegrou ps.com...
I want to implement silent printing in my project to print reports
programmatically, so that a user will not see any pop-up messages to do
with the printing process. For instance, I want to hide the "Printing
Page 1 of document.." dialog.

Curently I use .Print() method.

I found this article that solves problem within DevExp but i don't
wanna buy this component only because of this one feature... :(

http://www.devexpress.com/Support/Kn....xml?kbid=2658


Nov 17 '05 #4
Now I got another problem.

User required not to print directly but first to get preview.
Again google didn't answer to my queries...

Code now looks like this:
doc.PrintController = new StandardPrintController();
printPreviewControl1.Document = doc;
printPreviewControl1.Show();

but dialog "Generating Preview..." is showed... :(

Nov 17 '05 #5
Mrki,
I've never tried bypassing that dialog. It is being shown by the
PrintPreviewDialog which uses its' own print controller and doesn't appear
to be changeable. You could roll your own using a PrintPrieview Control but
then you will have to code all the controls for moving through the document
as well.
Just as an aside, my users don't seem to mind seeing the generating page
# dialog and it does act as a type of progress indicator which is useful for
some of our long documents.

Ron Allen
"Mrki [MCAD]" <ze***********@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Now I got another problem.

User required not to print directly but first to get preview.
Again google didn't answer to my queries...

Code now looks like this:
doc.PrintController = new StandardPrintController();
printPreviewControl1.Document = doc;
printPreviewControl1.Show();

but dialog "Generating Preview..." is showed... :(

Nov 17 '05 #6

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

Similar topics

0
2110
by: harish | last post by:
i am trying to install jdk1.4.0 using silent installation. i am performing the following steps: 1) First i am writing to a .iss file using the command: j2sdk-1_4_0-win.exe -a -r -f1"C:\setup.iss"...
1
2783
by: Peter Schmiedeskamp | last post by:
Hello, I'm writing in regard to the distutils package for python. I regularly repackage installers for silent/automated distribution on numerous Windows PCs throughout an enterprise. Sites such...
2
634
by: Mei | last post by:
HI! Sir, I'm having difficulties to save the web browser in silent. when I try to use WebBrowser1.ExecWB OLECMDID_SAVEAS, OLECMDEXECOPT_DONTPROMPTUSER, "c:\blank.html", "c:\blank.html"
0
1275
by: PiErre | last post by:
Hi, I used to install python 2.2 with the option /s (silent) on win2k server. Now I migrated to python 2.3 (Python-2.3.4.exe) and it seems to me that in all the registry values the drive is...
3
41817
by: TThai | last post by:
Hi, I've created an application that uses crystal report in VB dotnet environment. I've created an MSI package to be installed on the client pc to make the crystal report to work. However, the...
4
6743
by: Bob | last post by:
Hi, I am using Office XP PIAs. I want to use Word/Excel to printOut documents w/o bringing up the application at all. When I set the Visible field to false, I still get the printing window...
1
1911
by: eelisdotnet | last post by:
Hi I have an application that have to be installed in silent/passive mode. The first installation goes well. When I try to execute a silent/passive installation of the new version (new msi...
0
5181
by: blkwebman | last post by:
I'm trying to create a "standalone" install package (without any of the dialog boxes that a standard setup package would have). I think I understand how to do it in VB6 (using PDCmdLn.exe); I have...
112
5344
by: istillshine | last post by:
When I control if I print messages, I usually use a global variable "int silent". When I set "-silent" flag in my command line parameters, I set silent = 1 in my main.c. I have many functions...
0
7009
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
7178
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
7223
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
6899
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
7390
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
5475
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
4602
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...
0
3094
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
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 ...

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.