Click form even if "busy"

I got a program that does heavy duty processing and the only way I could see how it's progressing is thru a progress bar in a small form.  I recently included a button on this form with the intention of terminating the program whenever I want to, but I could not seem to get any processing time for it does not respond to mouse click.  How do I accomplish this?
Who is Participating?
TimCotteeConnect With a Mentor Commented:
You need to relinquish the processor during your long process, at some point in the loop, you should add the line:


Alternatively the api function Sleep can be used to allow other processes to get some time.

U Can Use DOEVENTS in The Procedure That Is Doing The Heavy Duty
Don't understand your comment balshe, that is what I said and imby has already accepted this answer!
same as above doevents()
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.