473,395 Members | 1,919 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,395 software developers and data experts.

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 11050
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
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
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
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
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
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
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
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
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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,...

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.