Hi,
I am working with c#.net after using VB6, and apart from a couple of problems it's not been bad, but I just came across this problem. I am trying to set the value of the textbox :
Error:"Cross-thread operation not valid: Control 'TextCounter' accessed from a thread other than the thread it was created on."
Yet, I can set the value of the box to 0 when I click a button, which I was assuming was also on a different thread - is this not the case?
If you have any ideas then that would be great - I seem to have more questions than answers at the moment.
Cheers,
Sparky.
I am working with c#.net after using VB6, and apart from a couple of problems it's not been bad, but I just came across this problem. I am trying to set the value of the textbox :
Code:
TextCounter.Text = Properties.Settings.Default.SoftwareCounterValue.ToString();
Error:"Cross-thread operation not valid: Control 'TextCounter' accessed from a thread other than the thread it was created on."
Yet, I can set the value of the box to 0 when I click a button, which I was assuming was also on a different thread - is this not the case?
If you have any ideas then that would be great - I seem to have more questions than answers at the moment.
Cheers,
Sparky.