|
-
Feb 15th, 2000, 12:15 PM
#1
Thread Starter
Member
Hi!
Anyone knows how do I kill a Printer job from the queue?
Thanks for your help
[email protected]
-
Mar 3rd, 2000, 03:36 AM
#2
Frenzied Member
Delete printer queue with api
PUT IN THE MODULE
Sub delpri()
r = Printer.DeviceName
a = OpenPrinter(r, hPrinter, 0)
b = SetPrinter(hPrinter, 0, vbNull, PRINTER_CONTROL_PURGE)
c = ClosePrinter(hPrinter)
End Sub
Public Declare Function SetPrinter Lib "winspool.drv" Alias "SetPrinterA" (ByVal hPrinter As Long, ByVal Level As Long, pPrinter As Byte, ByVal Command As Long) As Long
Public Const PRINTER_CONTROL_PURGE = 3
Public Declare Function OpenPrinter Lib "winspool.drv" Alias "OpenPrinterA" (ByVal pPrinterName As String, phPrinter As Long, pDefault As Any) As Long
Public Declare Function ClosePrinter Lib "winspool.drv" (ByVal hPrinter As Long) As Long
WHENEVER YOU CALL THE SUB 'DELPRI' ALL FILES READY TO PRINT WILL BE DELETED/
THE SAME AS SELECTING PURGE PRINT DOCUMENTS IN THE PRINTER FOLDER
[email protected]
-
Mar 3rd, 2000, 11:19 AM
#3
Conquistador
-
Aug 1st, 2000, 08:51 AM
#4
New Member
I could use some help!!
Hi,
I am currently working on a project where I have incorporated a "simple" printer manager. The last leg is to create a delete printjob function (please note I am fairly new to VB, about 8 months). I have attempted using "Printer.killdoc" but it didn't work (everytime I clicked the command button nothing happened. Also note that Windows Print Manager is handling the printing). After a lot of searching I came across your sample above. I tried it out but I am encountering the same results as the "Printer.killdoc" nothing happens when I click the command button.
Does anyone one have any suggestions? or Shed some light on this for me?
Any help would be greatly appreciated.
Thanks,
Joshua L. Ingram
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|