How to get the Print Job Status

Hi,
How do I get the status of a document that is being printed, and how do I get the amount of pages, and how much pages have already been printed?
I have searched the google, but i couldn't find it
Thanks
IbrahimHussainAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gemartiCommented:
I guess it depends on what programming language you are using you should be able to translate the following example into other languages:

Visual Basic: http://support.microsoft.com/kb/202480

0
IbrahimHussainAuthor Commented:
Thanks,
But I need this in VB.net 2005.
0
gemartiCommented:
In VB.net 2005 you must do the following:
+++++++++++++++++++++++++++++
'System.Drawing.Printing Namespace
'(See here: http://msdn.microsoft.com/en-us/library/system.drawing.printing%28v=VS.100%29.aspx)
Imports System.Drawing.Printing

'Create a PrintDocument Object
'(see here: http://msdn.microsoft.com/en-us/library/t2ds3xzt%28v=VS.100%29.aspx)
objPrintDoc = New PrintDocument()

'Start a print job by calling the print() function
objPrintDoc.Print()

'The PrintDocument object fires the PrintPage event
'(see here: http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.printpage.aspx)
' which provides the PrintPageEventArgs Object
'(See here: http://msdn.microsoft.com/en-us/library/system.drawing.printing.printpageeventargs.aspx)

Private Sub objPrintDoc_PrintPage(ByVal sender As Object, _
ByVal e As PrintPageEventArgs) Handles objPrintDoc.PrintPage
' (Printing code left out.)
End Sub

++++++++++++++++++++++++++++++++++++++++++++++++++++

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
OrcbighterCommented:
One thing to remember is that when you send a document to the printer it is actually spooled (cached), which may effect your responses.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.