VB.net app screen does not refresh

i wrote and application which that reads thru my server event logs.  the log files can be large and i have a progress bar on a statusbar.

the text in the status bar will update itself when told to, for instance ["now reading record ## of ##"]  but the statusbar will not increment.  even when i force a refresh of it.  also, when i minimize the app, and then bring it backup, the statusbar text refuses to even update anymore.

how do i fix this?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

Mike TomlinsonHigh School Computer Science, Computer Applications, and Mathematics TeachersCommented:
Sounds like you have a "tight loop" that is processing your logs.  Because of this your app is unable to process its messages and updates its interface since it is stuck in the loop.

The simple solution is to add this line:


inside your loop to allow your app to process its messages and update accordingly.

The "correct" solution though would be to move your processing into another thread so that your main UI interface does not get locked up.   This is more complex though is you need to use Delegates to marshal the call from your thread back onto the main UI thread.  Let me know if you want to go that route...
beaconlightboyAuthor Commented:
i was researching threads, but wasnt sure how to update the gui when using one.  when i set on up it just ran the code and said it was done, even though i know it wasnt.
Mike TomlinsonHigh School Computer Science, Computer Applications, and Mathematics TeachersCommented:
So you need a simple example of how to set up a thread and update the main GUI from it?
beaconlightboyAuthor Commented:
that would be great.  

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
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

From novice to tech pro — start learning today.