467,161 Members | 868 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,161 developers. It's quick & easy.

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

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
  • viewed: 1495
Share:
2 Replies
100+
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
Thanks, it works now
Nov 21 '06 #3

Post your reply

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

Similar topics

1 post views Thread by Michael R | last post: by
7 posts views Thread by Terry Carroll | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.