Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to interrupt long loop with mouse click?
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01387703
Message ID:
01387867
Views:
57
>>I put it in Form.Activate now (it was in different place) and it still works Ok. Maybe, your loop code is something specific. Try it with 'empty' loop, just DOEVENTS.
>
>I thought my loop was as 'empty' as it can be. Here is the code (I borrowed it from Anatoliy's example):
>
>
>LOCAL nIndex
>DO WHILE NOT thisform.lCancel 
>
>    CREATE CURSOR cs (num N(10))
>    FOR nIndex=1 TO 1000
>        INSERT INTO cs VALUES (nIndex)
>    ENDFOR
> 
>    ?? "."
>    DOEVENTS
> 
>ENDDO
>RETURN 
>
>
>What should I clear from my loop?

Put DOEVENTS inside the FOR loop.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform