• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 170
  • Last Modified:

stops the default printer and cancel print jobs

I have to call MS-Dos aplication with a shell but its generates a print job. I want to stop the default printer before the shell, and then when my VB aplication get the focus cancel the MS-dos printer jobs

could you help me??
any example?

thank you,
0
coprytel
Asked:
coprytel
1 Solution
 
coprytelAuthor Commented:
Adjusted points to 100
0
 
watyCommented:
On solution is starting a document before shelling, then once the shell is done, abort the two documents.

Declare Function AbortDoc Lib "gdi32" Alias "AbortDoc" (ByVal hdc As Long) As Long

Printer.Print
Shell ....

Printer.KillDoc

call AbortDoc(Printer.hDC)
0
 
MirkwoodCommented:
Bought This Question.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now