Any idea on how to create a printer monitor that has a counter which increases every time a print out is given and then passes the printing data to the actual printer driver ?
Printable View
Any idea on how to create a printer monitor that has a counter which increases every time a print out is given and then passes the printing data to the actual printer driver ?
How you do this depends on which operating system you are using. In Windows 95, 98 or Me (the toy OSes) you subclass your application main window and look out for a WM_SPOOLERSTATUS message ... but this can be quite unrelkiable.
In Windows NT, 2000, XP or Server.Net you install call FindFirstPrinterChangeNotification followed by WaitForMultipleObjects and FindnextPrinterChangeNotification in a loop to be notified whenever a printer event occurs......your best bet is to go to The printer status article and to download the code linked to the bottom of that article - the PrintWatchServer.vbp project demonstrates this...
Thanks, I will check it out and return back to you if I have some problems.