0
I need 2 Abels of my form to be updated every 1 second, so I threaded it myself load of Form:
Thread threadUpdate = new Thread(new ThreadStart(UpdateState));
threadUpdate.Start();
And my method UpdateStateis as follows:
private void UpdateState()
{
ChangeAutoRestartValue();
ChangeShellValue();
Thread.Sleep(1000);
UpdateState();
}
Both methods within mine UpdateState are to update specific Abels, but since it is not the main thread that is updating the value of these Abels, it does not allow this to be done.
How can I update the value of these Abels using this thread to update their values?