Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To Cancel This Process
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01024524
Message ID:
01024861
Views:
22
That did it. It's not instantanous, but it works.

Thanks


>>I have the following code. I have a Cancel button on a form
>>that sets lCancelled to .T.
>>
>>When this loop starts, I cannot seem to get to the button
>>because the printing is happeing.
>>
>>How do I allow the user to stop this?
>>
>>
>>FOR nInvoice = 1 TO ALEN(aTemp, 1)
>>
>>  oForm.lstInvoices.Picture(nInvoice) = "Graphics\Arrow.bmp"
>>
>>  IF oForm.lCanclled
>>    IF MESSAGEBOX("Cancel printing?",4+32+256, "Print Invoices") = 6
>>      EXIT
>>    ENDIF
>>  ENDIF
>>
>>  oApp.oInvProcs.PrintInvoice()
>>
>>  oForm.lstInvoices.Picture(nInvoice) = "Graphics\Checkmark.bmp"
>>
>>ENDFOR
>>
>>
>
>You need to add a DOEVENTS inside your loop. This will allow the button that sets your flag to execute.
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Previous
Reply
Map
View

Click here to load this message in the networking platform