Updating of Winform UI every second

Hi, i have a UI which displays values (Around 40) and i have to update all the 40 values every second as there are chances..the values will be altered at any time. But creating a loop and updating the UI every sec..i figured out it will make the UI super unresponsive..or the UI won't even show up. I have tried using timers for such an app in vb6 and the result was an unresponsive UI. Are there any way i can create multiple threads to update my UI (i.e getting the threads to UI so that load can be shared instead of getting the main app thread to do it all) Some simple code sample would be best or links to resources and case studies regarding this. Thanks
jaxrpcAsked:
Who is Participating?

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

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

AlexFMCommented:
Updating UI evry second by timer doesn't look like complicated task. I think that this is what you should do.
Notice that worker thread cannot update UI directly, it must call UI function using Invoke or BeginInvoke function. Function which updates UI in any case runs in main application thread.
You don't say anything about source of information. Worker thread can do some calculations, read data from some device or socket, but UI is always updated from amin thread.
Mike TomlinsonHigh School Computer Science, Computer Applications, and Mathematics TeachersCommented:
Encapsulate your Thread in a Class that raises a custom Event.  When the main form receives the Event, use a Delegate and the Invoke() method to marshal the call from the thread onto your main UI thread.

Here are some examples:
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21741689.html
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21729609.html
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/Q_21702866.html

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
Visual Basic.NET

From novice to tech pro — start learning today.