Showing posts with label C#. Show all posts
Showing posts with label C#. Show all posts

Friday, October 18, 2019

PrintQueue.Purge Method

Code help to Purge Network/Local Print .

Dim ps = New LocalPrintServer(PrintSystemDesiredAccess.AdministrateServer)
Dim pq = New PrintQueue(ps, ps.DefaultPrintQueue.FullName, 

PrintSystemDesiredAccess.AdministratePrinter)

If pq.NumberOfJobs > 0 Then
pq.Purge()
End If