[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Printing result ?

Posted on 1997-10-14
3
Medium Priority
?
279 Views
Last Modified: 2010-04-04
We would like to know, when we send a file to the printer, if the file was printed.

Is there a (Windows API/Delphi) function who can give the print-result back to our program ?

Jan.
0
Comment
Question by:JanDidden
  • 2
3 Comments
 
LVL 3

Expert Comment

by:mirek071497
ID: 1347489
I Think so no, because You can only get information if the job was sended to PrintManager. I don't know any way to get information from PrintManager about his jobs, but you can try with dde or other method.
0
 
LVL 3

Accepted Solution

by:
Pegasus100397 earned 100 total points
ID: 1347490
Jan,

Unfortunately I don't think there is a function to determine if the file has been printed. Your program would only be able to determine when the file was cleared from the print queue.

An alternative method (although kludgy IMHO) might be to monitor the status of the Printer queue dialog box (the one that comes up when you right-click on the printer icon in the status tray), scan the items contained in it (get the handle of the dialog and scan it's children for the list box containing the print jobs). Your program would, of course,  have to know the name of the report it just printed and "alert itself" when the report name ceased to exist in the print queue (job printed).

Anyways, hope this helps & good luck.
Pegasus
0
 
LVL 3

Expert Comment

by:Pegasus100397
ID: 1347491
Jan,

My previous "Answer" was not quite 100% true. Upon further research I found the Windows API functions for monitoring the status of a print job. Check out online-help for
WM_SPOOLERSTATUS,
JOB_INFO_2 (very good explaination there),
GetJob,
SetJob and EnumJobs

These are messages/API functions that will allow you to monitor the status of your print job. Let me know if these work for you or if you need help writing the functions to interface with the API.

Good luck
Pegasus
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question