none
How to Cancel Print Jobs in Window 7 - via VFP9

Answers

All replies

  • First of all, wouldn't it be easy and fair enough to teach your customers using the printer queue of Windows itself to cancel print jobs? 

    You will need the Win API. OpenPrinter, EnumJobs and SetJob still exist.

    http://www.news2news.com/vfp/?group=-1&function=544

    http://www.news2news.com/vfp/?group=57&function=564

    http://www.news2news.com/vfp/?group=57&function=573

    But sorry, I don't have the time to fiddle out the structures and code needed. Maybe someone else will help you, if you specify further. Do you want to enumerate all jobs for a user to choose from and cancel? Or do you only want to programmatically find your own print job and cancel it? Because in the seconds case you could perhaps also get the current printjob without going through EnumJobs.

    Bye, Olaf.

    Saturday, December 15, 2012 9:15 AM
  • Yes,

    1. I want to programmatically find my own print job and cancel it.

    2. I want to cancel all print Jobs.


    • Edited by R.a.j.e.s.h Saturday, December 15, 2012 9:50 AM
    Saturday, December 15, 2012 9:49 AM
  • News2news offers the complete code which is worth of the amount requested.

    Of course, it is you who placed the job into the print queue. Think twice before you do it and it will be free...

    BTW, the print queue can be processed before your delete action and switching the printer off or paper removal is the only solution in such a case.

    Saturday, December 15, 2012 6:52 PM
    Moderator
  • Sunday, December 16, 2012 2:56 AM
    Moderator
  • I would like to propose the previous post as an answer but "Unexpected error" always appears...
    Sunday, December 16, 2012 3:26 PM
    Moderator
  • Hi Pavel,

    This is a known bug. See this http://social.msdn.microsoft.com/Forums/en-US/reportabug/thread/6862b448-1e9a-4b6d-a93c-8545794907a3 and the thread referenced in that thread. I've been severely affected by this bug in last 3 months.


    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog

    Sunday, December 16, 2012 4:00 PM
    Moderator
  • Interesting. It does not happen so often to me but your activity is on another level. :-)

    Sunday, December 16, 2012 9:56 PM
    Moderator