?
Solved

Printing result ?

Posted on 1997-10-14
3
Medium Priority
?
274 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month8 days, 23 hours left to enroll

764 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