?
Solved

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

Posted on 2007-11-17
3
Medium Priority
?
200 Views
Last Modified: 2010-04-15
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?
0
Comment
Question by:rmmarsh
  • 2
3 Comments
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20304632
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:
http://www.codeproject.com/cs/threads/parameterizedthreads.asp
0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 2000 total points
ID: 20304655
about the cross-thread check, you can waive it. Implement a Load event in your form, and write inside:

CheckForIllegalCrossThreadCalls = false;
0
 

Author Comment

by:rmmarsh
ID: 20304722
Thank you so much... that did it! (CheckForIllegalCfrossThreadCalls)...
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month17 days, 7 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question