J
joe
Hi,
I have a dedicated worker thread for receiving bytes from
the serial port.
Upon receiving it fires an event RxData.
The main application thread has an event handler for
RxData. When I receive data from the port I want to create
a button and put it on the form. But I get exception:
"Controls created on one thread cannot be parented to a
control on a different thread"
But the event handler is in the main thread which is also
the GUI thread!
Does that mean that even if the event handler is in one
thread, it is considered by .NET as being in the thread
which fires the event?
Thank you
Joe
I have a dedicated worker thread for receiving bytes from
the serial port.
Upon receiving it fires an event RxData.
The main application thread has an event handler for
RxData. When I receive data from the port I want to create
a button and put it on the form. But I get exception:
"Controls created on one thread cannot be parented to a
control on a different thread"
But the event handler is in the main thread which is also
the GUI thread!
Does that mean that even if the event handler is in one
thread, it is considered by .NET as being in the thread
which fires the event?
Thank you
Joe