Solved

stops the default printer and cancel print jobs

Posted on 1998-10-20
3
163 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

867 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

22 Experts available now in Live!

Get 1:1 Help Now