All wrong. Why do you think you add a handler to a
Click
event in your background thread? It makes no sense. Do you think if you managed to add a handler to some event's invocation list, it will make an event itself calling this method in the same thread? Why? No way!
Events, delegate instances and any methods generally have nothing to do with the threads; any method can be called from any thread, but effect of it could be different, of course.
In particular, this is what happens when you call any UI-related methods or properties from non-UI thread. You simply cannot do it. Instead, you need to use the method
Invoke
or
BeginInvoke
of
System.Threading.Dispatcher
(for both Forms or WPF) or
System.Windows.Forms.Control
(Forms only).
You will find detailed explanation of how it works and code samples in my past answers:
Control.Invoke() vs. Control.BeginInvoke()[
^],
Problem with Treeview Scanner And MD5[
^].
See also more references on threading:
How to get a keydown event to operate on a different thread in vb.net[
^],
Control events not firing after enable disable + multithreading[
^].
—SA