Solved

stops the default printer and cancel print jobs

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

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…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…

786 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