How to make class a separate thread? (continued from #22957773)

In reference to the question above, I have tried to do as suggested.  However, there are some properties that I need to reference outside of the thread.  I am getting the following message:

Cross-thread operation not valid: Control 'lPricingServiceStatus' accessed from a thread other than the thread it was created on.

How do I cure this?

I also noticed that I can not start a thread on a method that needs paramaters passed to it... is there a way around this?
Who is Participating?
Jaime OlivaresConnect With a Mentor Software ArchitectCommented:
about the cross-thread check, you can waive it. Implement a Load event in your form, and write inside:

CheckForIllegalCrossThreadCalls = false;
Jaime OlivaresSoftware ArchitectCommented:
About the thread with parameters, collect all your parameters in a single object and use ParameterizedThreadStart to start thread. Have a look to the explanation at:
rmmarshAuthor Commented:
Thank you so much... that did it! (CheckForIllegalCfrossThreadCalls)...
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.