Solved

stops the default printer and cancel print jobs

Posted on 1998-10-20
3
162 Views
Last Modified: 2010-04-30
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
Comment
Question by:coprytel
3 Comments
 

Author Comment

by:coprytel
ID: 1440778
Adjusted points to 100
0
 
LVL 14

Accepted Solution

by:
waty earned 100 total points
ID: 1440779
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
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1440780
Bought This Question.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now