AAAAA kirjoitti:
Hi guys
i would know in that case i must delegates ?
Please sent me a example.
Thanks
Regards,
Cesar
Yesterday I used Invoke on a ListBox to add a line to the box. The code
that asked the adding was running on a different thread to the box, so
I put the Add method inside a delegate.
((ListBox)this.obj).Invoke(
(MethodInvoker) delegate()
{
((ListBox)this.obj).AddItem(msg, 2, Color.Red);
}
);
(The Color.Red tells that "msg" is actually an error message and the
ListBox is used as a message log).
--
Arto Viitanen