In windows based multi-threaded application, many times you may receive an Exception of Cross-Thread call exception (InvalidOperation Exception). Exception message is as shown below:
Cross-thread operation not valid: Control 'Control1' accessed from a thread other than the thread it was created on.
Scenario: Consider an application in which a child form will be opened from the MDI parent and a control called "label1" will be updated by a function written in the same form class and called from the MDI with different thread as shown below:
Cross-thread operation not valid: Control 'Control1' accessed from a thread other than the thread it was created on.
Scenario: Consider an application in which a child form will be opened from the MDI parent and a control called "label1" will be updated by a function written in the same form class and called from the MDI with different thread as shown below: