473,396 Members | 2,089 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,396 software developers and data experts.

printer job monitoring problem

hi,

i have written a printer job monitoring program as the code shown below , a
timer is used to call this function every second . i have a network printer
tat attached to my pc. i facing a problems that some time the program can
detect the print job but some how most of the time it cant detect any printer
job while actually the printing some documents .
any one has facing this problem before ? or any suggestion for me.
(i find out that most of the time when i print document from the internet
explorer , my program cant detect any print job)
beside using WMI , what others methods i can use to detect the print job ?

public void GetPrintJobsCollection()
{
string f_SearchQuery = "SELECT * FROM Win32_PrintJob";
ManagementObjectSearcher f_SearchPrintJobs =
new ManagementObjectSearcher(f_SearchQuery);
ManagementObjectCollection f_PrntJobCollection = f_SearchPrintJobs.Get();
foreach(ManagementObject f_PrntJob in f_PrntJobCollection)
{
MessageBox.Show ("Your Document(s) are Printing now") ;
m_JobID = f_PrntJob.Properties["JobId"].Value.ToString () ;
m_DocName = f_PrntJob.Properties["Document"].Value.ToString () ;
m_TotalPages = f_PrntJob.Properties["TotalPages"].Value.ToString () ;
m_PrinterQueue[m_PrintQCount] = m_JobID ;
if (Convert.ToDouble (m_TotalPages) <= 0)
m_TotalPages = "1" ;
DeductPrintingValue (Convert.ToInt16(m_TotalPages)) ;
}
Nov 17 '05 #1
0 1648

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

Similar topics

0
by: Dan | last post by:
Does .NET provide any way to implement printer monitoring (similar to FindFirstPrinterNotification), or is it necessary to call the API?
0
by: James Griffiths | last post by:
Here is a report I've written about a printing problem that is being experienced by a particular company for whom I had developed a A97 system. After upgrading to Win XP and AXP, some printing...
3
by: Gordon Truslove | last post by:
I've been trying to get the printer status using GetPrinter and Printer_Info_2 I'm getting closer, but it still fails. Error 122 - The data area passed to a system call is too small....
1
by: Mortel | last post by:
Hi, How I can get information from printer about count of copy pages, who's print pages etc. I want monitoring printers and save that information to file log. Maybe printer has any events to do...
4
by: sengkok | last post by:
hi, i have written a small print job monitoring program which can monitor the job ID and total pages printed . i am facing on strange problem which is the total print pages is always equal to 1 ,...
0
by: Jeff Reed | last post by:
I am experiencing the the problem outlined the below. Unfortunately, I am using WinXP and I not sure if I can apply the solution due to lack of security control Any feed back would be apreciated ...
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
3
by: Olaf Rabbachin | last post by:
Hi folks, during printing, I'm constantly checking the printer-spooler to monitor whether a document has showed up in a printer's spooler and - after it has - whether the print-job has been...
14
by: werdna.sivad | last post by:
I need to develop some software that will step in between a computer and it's printer. The software should read from one LPT port (connected to printing computer) and then redirect that traffic...
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...
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
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
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
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.