>Thanks,Hilmar
>
>DoEvents,may be I can use it!!!
I tried this, and it works (the user can click on a button while your program runs). However, it makes the program quite slow. I use VFP 6, and Vlad G. says the speed problem has been solved in VFP 7.
A workaround for VFP 6 might be to issue DoEvents with less frequency. Something like this:
select ... into cursor RecordsToProcess
scan
if recno() % 100 = 0
DoEvents
endif
endscan
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)