The notificationhandler is on another thread, so you have to marshal calls
back to the UI thread and create from there.
-Chris
"Thomas" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello all together,
>
> I'm trying to combine a TCP Socket Connection with ONE Form to receive
some
> kind of XML documents containing elements that should be displayed as
> controls (i.e. labels and textboxes for now).
>
> The receiving of such xml documents and the parsing is not a problem, but
> ...
>
> The Talker class is sending a notification to the form, containing the xml
> doc as string.
>
> Appearantly the Notificationhandler cannot call the
> this.Controls.Add(control) method to add the control to the controls of
the
> form.
>
> When I try this in the InitializeComponents() method of the form or on a
> Push button I can dynamically create controls and display them, but not
from
> within the notification handler.
>
> Am I doing something wrong or am I stupid ?
>
> regards
>
> Thomas
>
>
|