Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Proper cleanup
Message
From
14/02/2002 12:51:12
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00620112
Message ID:
00620169
Views:
12
>>>Hi everybody,
>>>
>>>Here is a problem:
>>>
>>>Class (or program) does some long process (Excel automation), but does not use any VFP specific loop construction. This class (program) shows an animation (using animation class), so user can at least be enterteined by this. However, some users (which are impatient, as I'm) could be tired of waitng and want to stop this long process right away. So, the problem is: how can we stop the process and return control to the main program, which invoked this long process program?
>>>
>>>What could be your ideas?
>>>
>>>Thanks a lot in advance.
>>
>>How about creating a separate, small, EXE, that only does your Word / Excel automation? RUN /N should work. OTOH, VFP doesn't have built-in multithreading capabilities.
>>
>>Hilmar.
>
>This seems to be an overkill for the things, I'm trying to do. Ok, to be more concrete (I guess, it's incorrect term, but I don't know any better):
>
>I have a generic simple form, which can work with any passed tables. I recently added a new option for printing reports in Excel using Daniel's QuickReport program and his animation class. Now I'm thinking, how can I interrupt this process of producing Excel from a table...

Option 1: Check every now and then (every record, for instance) whether the user presses a certain key. inkey() will do for this.

Option 2: Have a button on the form to interrupt. Issuing DoEvents every now and then will allow the user to click on the button. If I check for every record, it slows things down terribly in VFP 6, so I suggest you check every 100 records. Vlad says the speed problem was fixed in VFP 7.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform