?
Solved

How do I pause, copy and then cancel a print job before it starts printing?

Posted on 2007-11-29
3
Medium Priority
?
1,245 Views
Last Modified: 2012-06-27
I am using delphi7, I have written a simple app using Mad Collection components to hook the "CreateDCW", what happens is when a person clicks print, the hook causes a form to display asking the user if they want to print in draft mode. We already setup additional printer drivers for each printer with draft at the front.
Example: Normal Printer Name = "Lexmark 2400", Draft mode setup = "Draft Lexmark 2400".
Problems:
1) How do I get the current printer name  that is going to print, each time I try something I get the default printers name instead.
2) If the printer name = "Lexmark 2400" I want to change the printer and print the document to "Draft Lexmark 2400" instead if they click on the Yes option.
3) I then need to delete the print job from "Lexmark 2400" before it starts printing, so I assume I would need to pause it, get the jobs details and then delete it.

Like I said I have got the hook working and the form displays at the correct time but now I am stuck with the printer changes.
Some code for any of the above questions would be appreciated.
0
Comment
Question by:freelancedev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 17

Accepted Solution

by:
Shanmuga Sundaram earned 2000 total points
ID: 20396776
since I am not sure about your need, whether it is in VB or in Delphi. I just provide the link for your need. Please check whether this helps
http://www.merrioncomputing.com/Programming/PrintStatus.htm
http://support.microsoft.com/kb/202480
0
 
LVL 1

Expert Comment

by:Computer101
ID: 21216652
Forced accept.

Computer101
EE Admin
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Suggested Courses
Course of the Month14 days, 11 hours left to enroll

770 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