M
Mike Hildner
I have an MDI parent as my main form. Created a class library with a
component. This component waits for a UDP message, my plan was to pop up a
window showing the message when it arrives. The component raises an event in
response to the message - the MDI parent handles this event.
When this happens I get the following exception:
"Controls created on one thread cannot be parented to a control on a
different thread"
I am trying to pop up a MDI child form in the event handler. The component
starts a thread in the constructor - since there's no Sub Main in my
component, I launched this thread that calls a sub which has a never ending
loop to wait for incoming messages.
I imagine what I'm trying to do is possible, and that I just don't
understand enough to get it going. Can anyone suggest the proper way to
accomplish what I'd like to do?
Thanks,
Mike
component. This component waits for a UDP message, my plan was to pop up a
window showing the message when it arrives. The component raises an event in
response to the message - the MDI parent handles this event.
When this happens I get the following exception:
"Controls created on one thread cannot be parented to a control on a
different thread"
I am trying to pop up a MDI child form in the event handler. The component
starts a thread in the constructor - since there's no Sub Main in my
component, I launched this thread that calls a sub which has a never ending
loop to wait for incoming messages.
I imagine what I'm trying to do is possible, and that I just don't
understand enough to get it going. Can anyone suggest the proper way to
accomplish what I'd like to do?
Thanks,
Mike