N
Nijazi Halimaji
Hi everybody
I have created a new timer object
WithEvents tmr_check As New System.Timers.Timer
On my form_Load-Event I activated the timer...
Then I made a label on my form and putted on the Elapsed-Event of my timer
object following code to change the Label.Text
Label1.Text = "Ola"
When this event is executed, following error occurs:
"Cross-thread operation not valid: Control 'Label1' accessed from a thread
other than the thread it was created on."
I know that I have to set the label.text on the right thread, but how to do?
Never did this before!
Thanks for every help
Nijazi Halimaji
I have created a new timer object
WithEvents tmr_check As New System.Timers.Timer
On my form_Load-Event I activated the timer...
Then I made a label on my form and putted on the Elapsed-Event of my timer
object following code to change the Label.Text
Label1.Text = "Ola"
When this event is executed, following error occurs:
"Cross-thread operation not valid: Control 'Label1' accessed from a thread
other than the thread it was created on."
I know that I have to set the label.text on the right thread, but how to do?
Never did this before!
Thanks for every help
Nijazi Halimaji