By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,986 Members | 1,537 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,986 IT Pros & Developers. It's quick & easy.

How do I, Cancel a Print Job when in a loop

P: 3
Hi,

I have an app that opens Word docs, prints data into them, then it prints the doc then closes the doc. It does this in a loop.

The program works fine, I just can't stop it while it is printing.

It is a single form program, it has a close button, which is set to be the cancel button, but no keypresses are recognized while the printing loop is going on.

One thing that I thought of is that it is because a dialog box pops up for each document that prints, making it the top window. I don't know how to turn this of though.

If someone could help with this it would be appreaciated.

thanks
Nov 21 '06 #1
Share this Question
Share on Google+
2 Replies


100+
P: 267
Hi,

I have an app that opens Word docs, prints data into them, then it prints the doc then closes the doc. It does this in a loop.

The program works fine, I just can't stop it while it is printing.

It is a single form program, it has a close button, which is set to be the cancel button, but no keypresses are recognized while the printing loop is going on.

One thing that I thought of is that it is because a dialog box pops up for each document that prints, making it the top window. I don't know how to turn this of though.

If someone could help with this it would be appreaciated.

thanks
hi

put DOEVENTS in your loop
assign e.g: ESC to stop any printing
Nov 21 '06 #2

P: 3
Thanks, it works now
Nov 21 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.