>Hello,
>I'm working on a SQL in FoxPro 2.6, and I want to give the user the chance to escape from the long query with pressing the ESC button.
>What is the best way to do that?
>I would have a solution, but I'm not sure whether this is the best, and I wanted to hear some other ideas on this.
The only 100% effective way, and it's expensive in terms of overhead, is to insert a UDF() in the WHERE (and if in use, the HAVING clause as well) that calles DOEVENTS(). VFP is not happy being interrupted in the midst of executing a single line of code, with the result that it oftens seems to be not responding in Task manager, and it ignores standard Windows messages in this context as well.