|
|
The Printer Monitor Component is a .NET component which allows you to monitor and administer the print queue from VB.Net, C# or any of the .NET environments.
In addition it provides detailed information about jobs submitted to a print spooler, such as the user name, number of pages, orientation, file name and so on. Using this component it is possible to build powerful print job tracking applications in a very short timescale.
The control raises an event whenever a print job is added, removed or changed on any of the printer queues which are being monitored.
A job has been added to the printer queue being monitored
Private Sub PrinterMonitorComponent1_JobAdded(ByVal sender As Object, _
ByVal e As EventArgs) Handles PrinterMonitorComponent1.JobAdded
End Sub
A job has been written to the printer attached to the printer queue being monitored
Private Sub PrinterMonitorComponent1_JobWritten(ByVal sender As Object , _
ByVal e As EventArgs) Handles PrinterMonitorComponent1.JobAdded
End Sub
A job details has been changed
Private Sub PrinterMonitorComponent1_JobSet(ByVal sender As Object , _
ByVal e As EventArgs) Handles PrinterMonitorComponent1.JobSet
End Sub
A job has been removed from the printer queue being monitored
Private Sub PrinterMonitorComponent1_JobDeleted(ByVal sender As Object , _
ByVal e As EventArgs) Handles PrinterMonitorComponent1.JobAdded
End Sub
A change has occured in the printer information of the printer being monitored
Private Sub PrinterMonitorComponent1_PrinterInformationChanged(ByVal sender As Object , _
ByVal e As EventArgs) Handles PrinterMonitorComponent1.PrinterInformationChanged
End Sub
The drop-in component that monitors a given printer's job queue and raises the events accordingly.
Represents the event arguments for the PrinterMonitorComponent job added, written and deleted events.
Represents an individual job on the printer spool queue.
Represents the event arguments for the PrinterMonitorComponent's PrinterInformationChanged event.
Represents the status and information about printer being monitored.
Two new methods, AddPrinter and RemovePrinter have been added which allows the component to monitor more than one printer queue at a time. Because each monitor runs in its own thread, the printer queues events do not interfere with each other.
The string resources used by the component are all kept in a seperate dll, PrintQueueWatch.Resources.dll which means that it is possible to add localised language support to the component.
The component trace information can be turned on or off from the application.config file by setting the "PrintQueueWatch" switch in the System.Diagnostics section.
You can find out when the job was submitted to be printed and what size (in bytes) it is, in addition to the properties available in previous releases.
The PrintJob and PrinterInformation classes can now be inherited from and their properties overriden as desired.
You can select what events are monitored and which are not by setting the component's MonitorJobAddedEvent, MonitorJobDeletedEvent, MonitorJobWrittenEvent and MonitorJobSetEvent properties