[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.sdk

Waiting for a print job to finish in .NET

Brent Billups

10/9/2002 8:31:00 PM

I am trying to figure out how to wait for a print job to finish in .NET. =
I drive an application to send the job to the printer, and then need to =
wait for the job to finish to take further action. I wish to avoid =
polling if possible. Ultimately, I would like to have/write code that I =
can hand the printer queue name and job name that can wait for the job =
to be completed or some exit event to occur.

I have seen examples of how to code this in C using the Win32 API. This =
involved getting a handle to the printer and print job, and using =
Find*PrinterChangeNotification. This returns a handle that can be used =
in a Wait Function.

Using this technique in VB6 for a previous version of software, I was =
only able to get notification of any printer change, rather than =
completion of the job, and so was slightly better than polling.

Is there a better way of doing this in .NET than connecting to the DLLs =
and marshaling the data? Some class in the .NET or the API that I have =
missed?