Link to home
Start Free TrialLog in
Avatar of MyNameIsIvan
MyNameIsIvan

asked on

C# Multi Threading - How to make sure that calls to my controls are in a thread-safe way.

I have the following Form application built using Visual Studio 2010 which involves multi-threading.

When run, it updates some Form Control Labels.Text which then throws an exception saying "Cross-thread operation not valid: Control lblLabel accessed from a thread other than the thread it was created on."

How can I make this a thread safe?

ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial