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

When's The Printer Done?

I'm working on an office application that's going to need to print out
300+ billing statements. Since that seems like a lot, I'm thinking
that will slow things down, which would be bad. So then I thought
that it would be cool if I could just send a billing statement to the
printer when the printer wasn't busy printing. Send them to the
printer one-at-a-time.

System.Drawing.Printing.PrintDocument.EndPrint seemed to be the event
I wanted. It even says "Occurs when the last page of the document has
printed.". Unfortunately, it seems to fire every time a billing
statement is sent to the printer's spool. This means that all my 300+
billing statements get sent to the printer and then it prints them.

That's not what we're shooting for. I want to send the printer the
first billing statement, have it print it, send it the next billing
statement, have it print it, send it the next... etc.

Maybe I'm trying to do something weird, but it makes sense to me. It
would make it a lot easier to cancel the printing too. If I'm sending
billing statements to the printer one-at-a-time it would be easy to
flip a flag and have stop the loop that's sending the statements to
the printer.

Does anybody have any ideas? Surely I'm not trying to do the
impossible... right? Thanks for you help!

Deadly_Bait
Nov 15 '05 #1
1 1937
You should be able to get some information using WMI and the Win32_Printer
object. I would think that the Availability property should have what you
are looking for although you may have to experiment to see which of these
bits means exactly what you want.

Ron Allen
"Deadly_Bait" <br**********@hotmail.com> wrote in message
news:3d**************************@posting.google.c om...
I'm working on an office application that's going to need to print out
300+ billing statements. Since that seems like a lot, I'm thinking
that will slow things down, which would be bad. So then I thought
that it would be cool if I could just send a billing statement to the
printer when the printer wasn't busy printing. Send them to the
printer one-at-a-time.

System.Drawing.Printing.PrintDocument.EndPrint seemed to be the event
I wanted. It even says "Occurs when the last page of the document has
printed.". Unfortunately, it seems to fire every time a billing
statement is sent to the printer's spool. This means that all my 300+
billing statements get sent to the printer and then it prints them.

That's not what we're shooting for. I want to send the printer the
first billing statement, have it print it, send it the next billing
statement, have it print it, send it the next... etc.

Maybe I'm trying to do something weird, but it makes sense to me. It
would make it a lot easier to cancel the printing too. If I'm sending
billing statements to the printer one-at-a-time it would be easy to
flip a flag and have stop the loop that's sending the statements to
the printer.

Does anybody have any ideas? Surely I'm not trying to do the
impossible... right? Thanks for you help!

Deadly_Bait

Nov 15 '05 #2

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

Similar topics

2
by: Patrick Herb | last post by:
Hello, I'm trying to print the content of a RichTextBox from my VB 6 app. What I want is that the CommonDialog shows up, the user selects a printer and the content of the RichTextBox prints to...
8
by: kchengso | last post by:
One of my printers in my printer.devicename call returns in lower case. Is it possible for me to change it to upper case? I am also wondering how, in the first place, this particular printer...
5
by: Tom Berry | last post by:
We currently are trying our first transformation from VB6 to VB.Net. Of course, the Printer object is gone, but I'm having trouble finding the replacement syntax necessary to perform similar...
1
by: Kinetic - Paul G | last post by:
Hi All Hope someone can help out . . . I have a system that worked fine in A97 .and Win 98 with NT server . . . 10 PCs running a front end MDB and usual backend MDB with tables on the server....
1
by: intl04 | last post by:
I am getting strange print-related error messages when trying to create (not print!) reports. For example, when I click 'new' to create a report then choose 'design view', I get an error message...
5
by: Jerry Hull | last post by:
I'm working with a database developed by an untrained person over several years - and on a network that has recently been upgraded with a new server installed and MS office upgraded from 2K (I...
3
by: Vlki | last post by:
Hello, I can't find a way to send printer specific language codes to printer. Part of my code : String sString = "B50,0,0,3,1,2,50,B," + "12345678901234567890"; Font fFont = new Font("Arial",...
1
by: hasanainf | last post by:
Hi all and thanking you all in advance for your help My client wants to use a receipt printer. Since I have never used one before I have some questions. 1. Unlike other printers which are set...
10
by: sara | last post by:
Hi - I have a report that is 14 columnar sub-reports (Line up: Position- holders in each of our 14 locations - Manager, Assistant Manager, Receiving, Office, etc). I output directly to PDF...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
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...

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.