Greg,
Thanks, DOEVENTS is the trick I needed.
>In conjunction with Tore first suggestion, place a DOEVENTS statement inside the loop. This should allow your application to see the user click the stop button.
>
>>Something like this might do the job:
>>yourform.cmdStopAction.Click: yourform.lStopAction=.T.
>>yourform.cmdStartAction.Click: yourform.lStopAction=.F.
>>SCAN WHILE !yourform.lStopAction
>> ..Process a record
>>ENDSCAN
>>Or simply
>>yourform.cmdStopAction.Click: KEYBOARD '{ESC}' PLAIN
>>
>>>Dear all,
>>>
>>>In a VFP 8.0 application we have a screen where you can click on a button to process a certain amount of records of a table with some calculations. It may take some time and the user should be able to stop the process by pressing another button. But while the program scans through the records, there is no way you can press another button (the cursor changes to the hour glass cursor). We could rely on a good old Escape but we rather have a cancel button. Anybody knows how to do this?
>>>
>>>Thanks,
>>>
>>>Koos Veel.