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?
imbyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TimCotteeHead of Software ServicesCommented:
You need to relinquish the processor during your long process, at some point in the loop, you should add the line:

DoEvents

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

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
BalsheCommented:
U Can Use DOEVENTS in The Procedure That Is Doing The Heavy Duty
0
TimCotteeHead of Software ServicesCommented:
Don't understand your comment balshe, that is what I said and imby has already accepted this answer!
0
amit_panjwaniCommented:
same as above doevents()
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.