>I think Rick gave a very good technical explanation (I have learned from it). I have read - probably many moons ago - in a message here on UT that DOEVENTS would help. And you are correct that at one time I wanted to allow user to interrupt the process. But I could never successfully manage to do it. So maybe my DOEVENTS is left there from that time. It does not hurt anything though. Ideally I always wanted this particular part of the application to display the progress (by using ID) and allow user to cancel. But it is like many things: you wish, you try, it does not work, you move on.
I use DOEVENTS very successfully to give the user a chance to press on the cancel button or just close the form on the X. So there must be a reason why that does not work in your situation, and maybe it's the same reason why the DRAW() does not have effect in this particular case. The only thing I could imagine is that the process during the WHILE is extremely processor intensive, but I never saw a simple VALUE property set NOT responding to a DRAW().
perhaps you can shed some light what is happening in the loop and how the cancel button would interrupt the process? Could be a simple thing you overlooked.
Christian Isberner
Software Consultant