|
|
|
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, and the ability to modify some of this information. Using this component it is possible to build powerful print job tracking and related applications in a very short timescale.
The control raises an event whenever a print job is added, removed or changed on the printer queue which is being monitored.
A job has been added to the printer queue being monitored. The details of the job are held in e which is of type PrintJobEventArgs.
Private Sub PrinterMonitorComponent1_JobAdded(ByVal sender As Object, _
ByVal e As EventArgs) Handles PrinterMonitorComponent1.JobAdded
'\\ Example: Who sent the job that is being added to the print queue?
Debug.WriteLn(CType(e, PrintEventArgs).PrintJob.Username
End Sub
A job has been written to the printer attached to the printer queue being monitored. The details of the job are held in e which is of type PrintJobEventArgs.
Private Sub PrinterMonitorComponent1_JobWritten(ByVal sender As Object , _
ByVal e As EventArgs) Handles PrinterMonitorComponent1.JobAdded
End Sub
A job has been removed from the printer queue being monitored. The details of the job are held in e which is of type PrintJobEventArgs.
Private Sub PrinterMonitorComponent1_JobDeleted(ByVal sender As Object , _
ByVal e As EventArgs) Handles PrinterMonitorComponent1.JobAdded
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.